예제 #1
0
파일: tests.py 프로젝트: mpevner/djKarma
 def test_school_stats(self):
     starting_schools = School.objects.count()
     school = School(name="O Don Piano", facebook_id=12341234)
     school.save()
     ss = SiteStats.objects.all()[0]
     # save should have incremented this
     self.assertEqual(ss.numSchools, starting_schools + 1) 
예제 #2
0
파일: tests.py 프로젝트: mpevner/djKarma
 def test_school(self):
     school = School(name=u"O Don Piano", facebook_id=12341234)
     school.save()
     self.assertEqual(school.__unicode__(), u"O Don Piano")