Ejemplo n.º 1
0
 def test_downvote_deleted(self):
     Downvote.create_upvote_or_downvote(self.user, self.picture, Downvote)
     self.assertFalse(Downvote.objects.filter(user=self.user))
Ejemplo n.º 2
0
 def test_create_downvote_returns_true(self):
     value = Downvote.create_upvote_or_downvote(self.user, self.picture,
                                                Downvote)
     self.assertTrue(value)
     self.assertTrue(Downvote.objects.filter(user=self.user))
Ejemplo n.º 3
0
 def setUp(self):
     super().setUp()
     Downvote.create_upvote_or_downvote(self.user, self.picture, Downvote)