openapi-core/tests/unit/schema/test_paths.py
2019-06-18 14:54:02 +01:00

21 lines
478 B
Python

import mock
import pytest
from openapi_core.schema.paths.models import Path
class TestPaths(object):
@pytest.fixture
def path(self):
operations = {
'get': mock.sentinel.get,
'post': mock.sentinel.post,
}
return Path('/path', operations)
@property
def test_iteritems(self, path):
for http_method in path.operations:
assert path[http_method] ==\
path.operations[http_method]