def test_all(self): Favorite.objects.all().delete() db_before = Favorite.all() favorite = self.create_favorite() favorite.save() db_after = Favorite.all() self.assertTrue(db_before != db_after)
def favorites(self): ms = Favorite.all(topic_id=self.id) return ms