Пример #1
0
 def test_note_give_flag_karma(self):
     """Lose karma for flagging a note"""
     flag_note(self.request2, self.note.pk)
     try:
         NoteKarmaEvent.objects.get(event_type=NoteKarmaEvent.GIVE_FLAG, user=self.user2)
     except ObjectDoesNotExist:
         self.fail("Karma event not created")
Пример #2
0
 def test_note_get_flagged_karma(self):
     """Lose karma for having your note flagged many times"""
     flag_note(self.request2, self.note.pk)
     flag_note(self.request2, self.note.pk)
     flag_note(self.request2, self.note.pk)
     flag_note(self.request2, self.note.pk)
     flag_note(self.request2, self.note.pk)
     flag_note(self.request2, self.note.pk)
     try:
         NoteKarmaEvent.objects.get(event_type=NoteKarmaEvent.GET_FLAGGED, user=self.user1)
     except ObjectDoesNotExist:
         self.fail("Karma event not created")