mirror of
https://github.com/correl/openapi-core.git
synced 2024-12-01 03:00:09 +00:00
20 lines
497 B
Python
20 lines
497 B
Python
import mock
|
|
import pytest
|
|
|
|
from openapi_core.schemas import Schema
|
|
|
|
|
|
class TestSchemas(object):
|
|
|
|
@pytest.fixture
|
|
def schema(self):
|
|
properties = {
|
|
'application/json': mock.sentinel.application_json,
|
|
'text/csv': mock.sentinel.text_csv,
|
|
}
|
|
return Schema('object', properties=properties)
|
|
|
|
@property
|
|
def test_iteritems(self, schema):
|
|
for name in schema.properties.keys():
|
|
assert schema[name] == schema.properties[name]
|