mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-01 03:00:09 +00:00
22 lines
466 B
Python
22 lines
466 B
Python
import mock
|
|
import pytest
|
|
|
|
from openapi_core.specs import Spec
|
|
|
|
|
|
class TestSpecs(object):
|
|
|
|
@pytest.fixture
|
|
def spec(self):
|
|
servers = []
|
|
paths = {
|
|
'get': mock.sentinel.get,
|
|
'post': mock.sentinel.post,
|
|
}
|
|
return Spec(servers, paths)
|
|
|
|
@property
|
|
def test_iteritems(self, spec):
|
|
for path_name in spec.paths.keys():
|
|
assert spec[path_name] ==\
|
|
spec.paths[path_name]
|