8000 DjangoTestAdapter cannot deal with certain start_response invocations · Issue #7132 · encode/django-rest-framework · GitHub
[go: up one dir, main page]

Skip to content
DjangoTestAdapter cannot deal with certain start_response invocations #7132
Closed
@untitaker

Description

@untitaker

The start_response definition of rest-framework's test utilities does not conform to the signature presented in the WSGI PEP:

start_response(status, headers)   # wrong
start_response(status, headers, exc_info=None)  # right

This makes a difference for the following invocation, which is valid according to the WSGI PEP but will break the TestAdapter:

start_response(status, headers, sys.exc_info())
start_response(status, headers, None)

It is unclear to me whether the second invocation is actually valid, but a lot of implementations accept it regardless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0