Пример #1
0
 def test_board_evidence_notifications(self):
     """Test the add/edit evidence notifications work render reasonably."""
     evidence = Evidence.objects.create(
         board=self.board,
         evidence_desc='Evidence',
     )
     notify_add(self.board, self.other, evidence)
     notify_edit(self.board, self.other, evidence)
     self.login()
     response = self.client.get(reverse('openach:notifications'))
     self.assertContains(response, self.other.username, count=2)
     self.assertContains(response, self.board.board_title, count=2)
     self.assertContains(response, 'edited evidence', count=1)
     self.assertContains(response, 'added evidence', count=1)
Пример #2
0
 def test_board_hypothesis_notifications(self):
     """Test the add/edit hypothesis notifications work render reasonably."""
     hypothesis = Hypothesis.objects.create(
         board=self.board,
         hypothesis_text='Hypothesis',
     )
     notify_add(self.board, self.other, hypothesis)
     notify_edit(self.board, self.other, hypothesis)
     self.login()
     response = self.client.get(reverse('openach:notifications'))
     self.assertContains(response, self.other.username, count=2)
     self.assertContains(response, self.board.board_title, count=2)
     self.assertContains(response, 'edited hypothesis', count=1)
     self.assertContains(response, 'added hypothesis', count=1)