mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-24 11:09:54 +00:00
21 lines
471 B
Python
21 lines
471 B
Python
import mock
|
|
import pytest
|
|
|
|
from openapi_core.paths 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.keys():
|
|
assert path[http_method] ==\
|
|
path.operations[http_method]
|