openapi-core/tests/unit/test_specs.py
2017-09-21 12:51:37 +01:00

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]