def test_schema_format(schema_app):
    app_client = schema_app.app.test_client()
    headers = {'Content-type': 'application/json'}

    wrong_type = app_client.post('/v1.0/test_schema_format', headers=headers,
                                 data=json.dumps("xy"))  # type: flask.Response
    assert wrong_type.status_code == 400
    assert wrong_type.content_type == 'application/problem+json'
    wrong_type_response = json.loads(wrong_type.data.decode())  # type: dict
    assert wrong_type_response['title'] == 'Bad Request'
    assert "'xy' is not a 'date-time'" in wrong_type_response['detail']
dataset/ETHPy150Open zalando/connexion/tests/api/test_schema.py/test_schema_format/original