openapi-core/tests/unit/validation/test_util.py

19 lines
362 B
Python
Raw Normal View History

2018-07-28 22:51:36 +00:00
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'