fix coverage

This commit is contained in:
collerek
2021-04-28 17:16:30 +02:00
parent 11ed5fd322
commit d2921167bd
3 changed files with 23 additions and 4 deletions

View File

@ -218,6 +218,19 @@ def test_decimal_error_in_model_definition():
test: decimal.Decimal = ormar.Decimal(primary_key=True)
@typing.no_type_check
def test_binary_error_without_length_model_definition():
with pytest.raises(ModelDefinitionError):
class ExampleModel2(Model):
class Meta:
tablename = "example6"
database = database
metadata = metadata
test: bytes = ormar.LargeBinary(primary_key=True)
@typing.no_type_check
def test_string_error_in_model_definition():
with pytest.raises(ModelDefinitionError):