Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-bl committed Nov 5, 2024
1 parent d189f77 commit 344ec97
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_parser/test_properties/test_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pytest

from openapi_python_client.parser.properties.protocol import Value
from openapi_python_client.parser.properties.schemas import ReferencePath


def test_is_base_type(any_property_factory):
Expand Down Expand Up @@ -85,3 +86,11 @@ def test_get_base_json_type_string(quoted, expected, any_property_factory, mocke
mocker.patch.object(AnyProperty, "_json_type_string", "str")
p = any_property_factory()
assert p.get_base_json_type_string(quoted=quoted) is expected

def test_ref_path(any_property_factory, model_property_factory):
p1 = any_property_factory()
assert p1.get_ref_path() is None

path = ReferencePath("/components/schemas/A")
p2 = model_property_factory(ref_path=path)
assert p2.get_ref_path() == path

0 comments on commit 344ec97

Please sign in to comment.