diff --git a/rhodecode/tests/functional/test_files.py b/rhodecode/tests/functional/test_files.py
--- a/rhodecode/tests/functional/test_files.py
+++ b/rhodecode/tests/functional/test_files.py
@@ -15,11 +15,11 @@ class TestFilesController(TestController
revision='tip',
f_path='/'))
# Test response...
- assert 'docs' in response.body, 'missing dir'
- assert 'tests' in response.body, 'missing dir'
- assert 'vcs' in response.body, 'missing dir'
- assert '.hgignore' in response.body, 'missing file'
- assert 'MANIFEST.in' in response.body, 'missing file'
+ assert 'docs' in response.body, 'missing dir'
+ assert 'tests' in response.body, 'missing dir'
+ assert 'vcs' in response.body, 'missing dir'
+ assert '.hgignore' in response.body, 'missing file'
+ assert 'MANIFEST.in' in response.body, 'missing file'
def test_index_revision(self):
@@ -34,9 +34,9 @@ class TestFilesController(TestController
#Test response...
- assert 'docs' in response.body, 'missing dir'
- assert 'tests' in response.body, 'missing dir'
- assert 'README.rst' in response.body, 'missing file'
+ assert 'docs' in response.body, 'missing dir'
+ assert 'tests' in response.body, 'missing dir'
+ assert 'README.rst' in response.body, 'missing file'
assert '1.1 KiB' in response.body, 'missing size of setup.py'
assert 'text/x-python' in response.body, 'missing mimetype of setup.py'
diff --git a/rhodecode/tests/test_models.py b/rhodecode/tests/test_models.py
--- a/rhodecode/tests/test_models.py
+++ b/rhodecode/tests/test_models.py
@@ -175,29 +175,34 @@ class TestNotifications(unittest.TestCas
def test_create_notification(self):
usrs = [self.u1, self.u2]
- notification = Notification.create(subject='subj', body='hi there',
- recipients=usrs)
+ notification = Notification.create(created_by=self.u1,
+ subject='subj', body='hi there',
+ recipients=usrs)
notifications = Session.query(Notification).all()
unotification = UserNotification.query()\
.filter(UserNotification.notification == notification).all()
self.assertEqual(len(notifications), 1)
self.assertEqual(notifications[0].recipients, [self.u1, self.u2])
- self.assertEqual(notification, notifications[0])
+ self.assertEqual(notification.notification_id,
+ notifications[0].notification_id)
self.assertEqual(len(unotification), len(usrs))
self.assertEqual([x.user.user_id for x in unotification],
[x.user_id for x in usrs])
def test_user_notifications(self):
- notification1 = Notification.create(subject='subj', body='hi there',
- recipients=[self.u3])
- notification2 = Notification.create(subject='subj', body='hi there',
- recipients=[self.u3])
+ notification1 = Notification.create(created_by=self.u1,
+ subject='subj', body='hi there',
+ recipients=[self.u3])
+ notification2 = Notification.create(created_by=self.u1,
+ subject='subj', body='hi there',
+ recipients=[self.u3])
self.assertEqual(self.u3.notifications, [notification1, notification2])
def test_delete_notifications(self):
- notification = Notification.create(subject='title', body='hi there3',
- recipients=[self.u3, self.u1, self.u2])
+ notification = Notification.create(created_by=self.u1,
+ subject='title', body='hi there3',
+ recipients=[self.u3, self.u1, self.u2])
notifications = Notification.query().all()
self.assertTrue(notification in notifications)