mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-24 11:09:54 +00:00
20 lines
508 B
Python
20 lines
508 B
Python
import mock
|
|
import pytest
|
|
|
|
from openapi_core.schema.schemas.models import Schema
|
|
|
|
|
|
class TestSchemaIteritems(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_valid(self, schema):
|
|
for name in schema.properties:
|
|
assert schema[name] == schema.properties[name]
|