Skip to content

Commit 344ec97

Browse files
committed
test coverage
1 parent d189f77 commit 344ec97

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test_parser/test_properties/test_protocol.py

+9
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import pytest
44

55
from openapi_python_client.parser.properties.protocol import Value
6+
from openapi_python_client.parser.properties.schemas import ReferencePath
67

78

89
def test_is_base_type(any_property_factory):
@@ -85,3 +86,11 @@ def test_get_base_json_type_string(quoted, expected, any_property_factory, mocke
8586
mocker.patch.object(AnyProperty, "_json_type_string", "str")
8687
p = any_property_factory()
8788
assert p.get_base_json_type_string(quoted=quoted) is expected
89+
90+
def test_ref_path(any_property_factory, model_property_factory):
91+
p1 = any_property_factory()
92+
assert p1.get_ref_path() is None
93+
94+
path = ReferencePath("/components/schemas/A")
95+
p2 = model_property_factory(ref_path=path)
96+
assert p2.get_ref_path() == path

0 commit comments

Comments
 (0)