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)
def test_school(self): school = School(name=u"O Don Piano", facebook_id=12341234) school.save() self.assertEqual(school.__unicode__(), u"O Don Piano")