示例#1
0
 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)
示例#2
0
 def favorites(self):
     ms = Favorite.all(topic_id=self.id)
     return ms