liniting and applying black
This commit is contained in:
@ -109,6 +109,22 @@ def test_setting_pk_column_as_pydantic_only_in_model_definition():
|
||||
test = fields.Integer(name='test12', primary_key=True, pydantic_only=True)
|
||||
|
||||
|
||||
def test_decimal_error_in_model_definition():
|
||||
with pytest.raises(ModelDefinitionError):
|
||||
class ExampleModel2(Model):
|
||||
__tablename__ = "example4"
|
||||
__metadata__ = metadata
|
||||
test = fields.Decimal(name='test12', primary_key=True)
|
||||
|
||||
|
||||
def test_string_error_in_model_definition():
|
||||
with pytest.raises(ModelDefinitionError):
|
||||
class ExampleModel2(Model):
|
||||
__tablename__ = "example4"
|
||||
__metadata__ = metadata
|
||||
test = fields.String(name='test12', primary_key=True)
|
||||
|
||||
|
||||
def test_json_conversion_in_model():
|
||||
with pytest.raises(pydantic.ValidationError):
|
||||
ExampleModel(test_json=datetime.datetime.now(), test=1, test_string='test', test_bool=True)
|
||||
|
||||
Reference in New Issue
Block a user