Skip to content

Raising HTTPBadRequest gives a bad response.status_code in Django test #10

Description

@gregtap

response.status_code is '400 Bad Request' instead of 400

Django Test

response = self.client.post(self.url_create_user, data, follow=True)
self.assertEquals(response.status_code, 400)

Webmachine resources.py

def to_json(self, req, resp):
....
raise HTTPBadRequest(resp)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions