You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a test suite with .tox to validate a spec against an existing API and this error is raised with Python 3.4 and Python3.5. Apparently empty bytearrays aren't considered on EMPTY_BODIES.
defvalidate_response_body(op, response_spec, response):
"""Validate an outgoing response's body against the response's Swagger specification. :type op: :class:`bravado_core.operation.Operation` :type response_spec: dict :type response: :class:`bravado_core.response.OutgoingResponse` :raises: SwaggerMappingError """deref=op.swagger_spec.deref# response that returns nothing in the bodyresponse_body_spec=deref(response_spec.get('schema'))
ifresponse_body_specisNone:
ifresponse.textinEMPTY_BODIES:
returnraiseSwaggerMappingError(
>"Response body should be empty: {0}".format(response.text))
Ebravado_core.exception.SwaggerMappingError: Responsebodyshouldbeempty: b''
The text was updated successfully, but these errors were encountered:
I'm writing a test suite with .tox to validate a spec against an existing API and this error is raised with Python 3.4 and Python3.5. Apparently empty bytearrays aren't considered on
EMPTY_BODIES
.The text was updated successfully, but these errors were encountered: