openapi-core/tests/unit/validation/test_util.py
2018-07-29 00:16:30 +01:00

18 lines
362 B
Python

from openapi_core.validation.util import path_qs
class TestPathQs(object):
def test_path(self):
url = 'https://test.com:1234/path'
result = path_qs(url)
assert result == '/path'
def test_query(self):
url = 'https://test.com:1234/path?query=1'
result = path_qs(url)
assert result == '/path?query=1'