16 c = Client() |
16 c = Client() |
17 c.login(username='user1', password='test') |
17 c.login(username='user1', password='test') |
18 self.assertEquals(len(Notification.objects.all()), 0) |
18 self.assertEquals(len(Notification.objects.all()), 0) |
19 |
19 |
20 # subscribe to workspace notifications |
20 # subscribe to workspace notifications |
21 response = c.post('/notifications/', {'notif_id': u'workspace_notify_check', |
21 response = c.post('/followup/', {'notif_id': u'workspace_notify_check', |
22 'workspace_notify_check': u'workspace_notify_check', |
22 'workspace_notify_check': u'workspace_notify_check', |
23 }) |
23 }) |
24 |
24 |
25 self.assertEquals(len(Notification.objects.all()), 1) |
25 self.assertEquals(len(Notification.objects.all()), 1) |
26 |
26 |
27 # subscribe to own notifications |
27 # subscribe to own notifications |
28 response = c.post('/notifications/', {'notif_id': u'own_notify_check', |
28 response = c.post('/followup/', {'notif_id': u'own_notify_check', |
29 'own_notify_check': u'true', |
29 'own_notify_check': u'true', |
30 }) |
30 }) |
31 |
31 |
32 self.assertEquals(len(Notification.objects.all()), 2) |
32 self.assertEquals(len(Notification.objects.all()), 2) |
33 |
33 |
34 self.assertEquals(len(mail.outbox), 0) |
34 self.assertEquals(len(mail.outbox), 0) |
35 |
35 |