def test_get_defaults_with_a_date_throws_an_error(self): name = Colour._meta.get_field("name") with patch.object(name, "get_default") as get_default: get_default.return_value = datetime.date.today() with self.assertRaises(exceptions.APIError): Colour._get_field_default("name")
def test_get_defaults_with_a_date_throws_an_error(self): name = Colour._meta.get_field("name") with patch.object(name, "get_default") as get_default: get_default.return_value = datetime.date.today() with self.assertRaises(exceptions.APIError): Colour._get_field_default("name")
def test_get_defaults_from_ftfk_when_there_are_no_defaults(self): self.assertEqual(None, Colour._get_field_default("name"))
def test_get_defaults_from_ftfk_when_there_are_no_defaults(self): self.assertEqual(None, Colour._get_field_default("name"))