mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-25 03:00:11 +00:00
21 lines
560 B
Python
21 lines
560 B
Python
import mock
|
|
import pytest
|
|
|
|
from openapi_core.schema.request_bodies.models import RequestBody
|
|
|
|
|
|
class TestRequestBodies(object):
|
|
|
|
@pytest.fixture
|
|
def request_body(self):
|
|
content = {
|
|
'application/json': mock.sentinel.application_json,
|
|
'text/csv': mock.sentinel.text_csv,
|
|
}
|
|
return RequestBody(content)
|
|
|
|
@property
|
|
def test_iteritems(self, request_body):
|
|
for mimetype in request_body.content.keys():
|
|
assert request_body[mimetype] ==\
|
|
request_body.content[mimetype]
|