Skip to content

Commit 42a56da

Browse files
committed
Add ModelProperty test test_process_properties_all_of_reference_not_exist
1 parent 8fe2c75 commit 42a56da

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_parser/test_properties/test_model_property.py

+10
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,16 @@ def test_process_properties_reference_not_exist(self):
333333

334334
assert isinstance(result, PropertyError)
335335

336+
def test_process_properties_all_of_reference_not_exist(self):
337+
from openapi_python_client.parser.properties import Schemas
338+
from openapi_python_client.parser.properties.model_property import _process_properties
339+
340+
data = oai.Schema.construct(allOf=[oai.Reference.construct(ref="#/components/schema/NotExist")])
341+
342+
result = _process_properties(data=data, class_name="", schemas=Schemas(), config=Config(), roots={"root"})
343+
344+
assert isinstance(result, PropertyError)
345+
336346
def test_process_properties_model_property_roots(self, model_property_factory):
337347
from openapi_python_client.parser.properties import Schemas
338348
from openapi_python_client.parser.properties.model_property import _process_properties

0 commit comments

Comments
 (0)