def test_validate(self): m = Phone() m.country_code = '123' self.assertRaises(ModelValidationError, m.validate)