openapi-core/tests/unit/schema/test_operations.py
2021-03-31 16:17:40 +01:00

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]