def test_patient_has_birthday(self): all_patients_in_db = Patient.objects.all() self.assertEquals(len(all_patients_in_db), 0) # can create a patient that is male man = Patient() # man.birthday = timezone.now() man.birthday = datetime.date(2011, 11, 11) man.save() # check db to see if patient exists man_in_db = Patient.objects.get(birthday=man.birthday) self.assertEquals(man.birthday, man_in_db.birthday)