Skip to content

Commit 4b492b8

Browse files
committed
test: Fill a discovered coverage hole
1 parent 10212d5 commit 4b492b8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/test_parser/test_responses.py

+23
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,29 @@ def test_response_from_data_no_content(any_property_factory):
3131
)
3232

3333

34+
def test_response_from_data_reference(any_property_factory):
35+
from openapi_python_client.parser.responses import Response, response_from_data
36+
37+
response, schemas = response_from_data(
38+
status_code=200,
39+
data=oai.Reference.construct(),
40+
schemas=Schemas(),
41+
parent_name="parent",
42+
config=MagicMock(),
43+
)
44+
45+
assert response == Response(
46+
status_code=200,
47+
prop=any_property_factory(
48+
name="response_200",
49+
default=None,
50+
nullable=False,
51+
required=True,
52+
),
53+
source="None",
54+
)
55+
56+
3457
def test_response_from_data_unsupported_content_type():
3558
from openapi_python_client.parser.responses import response_from_data
3659

0 commit comments

Comments
 (0)