mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-25 19:19:55 +00:00
19 lines
520 B
Python
19 lines
520 B
Python
import mock
|
|
import pytest
|
|
|
|
from openapi_core.schema.operations.models import Operation
|
|
|
|
|
|
class TestSchemas(object):
|
|
|
|
@pytest.fixture
|
|
def operation(self):
|
|
parameters = {
|
|
'parameter_1': mock.sentinel.parameter_1,
|
|
'parameter_2': mock.sentinel.parameter_2,
|
|
}
|
|
return Operation('get', '/path', {}, parameters=parameters)
|
|
|
|
def test_iteritems(self, operation):
|
|
for name in operation.parameters:
|
|
assert operation[name] == operation.parameters[name]
|