mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-28 19:19:52 +00:00
22 lines
558 B
Python
22 lines
558 B
Python
|
import mock
|
||
|
import pytest
|
||
|
|
||
|
from openapi_core.request_bodies 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 content_type in request_body.content.keys():
|
||
|
assert request_body[content_type] ==\
|
||
|
request_body.content[content_type]
|