def test_patient_last_name(self): try: patient = Patient() patient.last_name = 'ho' patient.save() except IntegrityError: return HttpResponseServerError() self.assertEqual(patient.last_name, 'ho')