openapi-core/tests/unit/test_specs.py

23 lines
466 B
Python
Raw Normal View History

2017-09-21 11:51:37 +00:00
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]