Commit a9a2e21b by Őry Máté

dashboard: test notification view

parent 42dd7983
......@@ -224,3 +224,13 @@ class VmDetailTest(TestCase):
'disk-size': 1})
self.assertEqual(response.status_code, 302)
self.assertEqual(disks + 1, inst.disks.count())
def test_notification_read(self):
c = Client()
self.login(c, "user1")
self.u1.profile.notify('subj', 'dashboard/test_message.txt',
{'var': 'testme'})
assert self.u1.notification_set.get().status == 'new'
response = c.get("/dashboard/notifications/")
self.assertEqual(response.status_code, 200)
assert self.u1.notification_set.get().status == 'read'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment