Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Support using JSONRenderer in TEST_REQUEST_RENDERER_CLASSES #199

Closed
@stianpr

Description

@stianpr

It would be very nice to use the JSONRenderer as default request renderer in tests. In latest release it will break because it does not have any renderer context. So by supporting this a test could look something like this:

client = APIClient()
response = client.patch(
   '/api/companies/1'
    {'name': 'A new company name'},
    format='vnd.api+json'
)
assert response.status_code == status.HTTP_200_OK

Then we don't have to build the payload for data in correct JSON API spec 1.0. The renderer does that for us.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions