Skip to content

Commit 073e2b8

Browse files
committed
Add regression test for OAS3.0 array containing null unmarshalling
1 parent cc2225e commit 073e2b8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/integration/unmarshalling/test_unmarshallers.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,23 @@ def test_no_type(self, unmarshallers_factory, value):
7373

7474
assert result == value
7575

76+
@pytest.mark.parametrize(
77+
"factory",
78+
[
79+
oas30_write_schema_unmarshallers_factory,
80+
oas31_schema_unmarshallers_factory,
81+
],
82+
)
83+
def test_no_type_object_with_array_of_null(self, factory):
84+
schema = {}
85+
spec = SchemaPath.from_dict(schema)
86+
unmarshaller = factory.create(spec)
87+
value = {"foo": [None]}
88+
89+
result = unmarshaller.unmarshal(value)
90+
91+
assert result == value
92+
7693
@pytest.mark.parametrize(
7794
"type,value",
7895
[

0 commit comments

Comments
 (0)