def test_try_to_get_failure(self): # test whether the try to get function works self.assertEqual(Person.try_to_get(first_name='Nonexistent'),False)
def test_try_to_get_success(self): # get the person person = Person.objects.get(first_name='First') # test whether the try to get function works self.assertEqual(Person.try_to_get(first_name='First'),person)