Remove lookup_table from inflator generated code, rename generating func
This commit is contained in:
@@ -12,7 +12,7 @@ def test_missing_field():
|
||||
a: int
|
||||
|
||||
infl = SchemaInflatorGenerator()
|
||||
fn = infl.schema_to_generator(A)
|
||||
fn = infl.schema_to_inflator(A)
|
||||
with pytest.raises(MissingFieldException):
|
||||
fn({})
|
||||
|
||||
@@ -23,7 +23,7 @@ def test_null():
|
||||
a: int
|
||||
|
||||
infl = SchemaInflatorGenerator()
|
||||
fn = infl.schema_to_generator(A)
|
||||
fn = infl.schema_to_inflator(A)
|
||||
with pytest.raises(FieldValidationException):
|
||||
fn({'a': None})
|
||||
|
||||
@@ -34,6 +34,6 @@ def test_invalid_field():
|
||||
a: float | int | None
|
||||
|
||||
infl = SchemaInflatorGenerator()
|
||||
fn = infl.schema_to_generator(A)
|
||||
fn = infl.schema_to_inflator(A)
|
||||
with pytest.raises(FieldValidationException):
|
||||
fn({'a': {}})
|
||||
|
||||
Reference in New Issue
Block a user