Skip to content
Snippets Groups Projects
Commit d7d32540 authored by Martin Burchell's avatar Martin Burchell
Browse files

Improved debugging from test function

parent 29d7f2f6
Branches
No related tags found
1 merge request!9Refactored REST API tests to use the API where possible
......@@ -12,7 +12,10 @@ from rest_api.views import ItemViewSet
def create_item(**kwargs):
request = APIRequestFactory().post('/items', kwargs)
view = ItemViewSet.as_view(actions={'post': 'create'})
return view(request)
response = view(request)
assert status.is_success(response.status_code), response.data
return response
@pytest.mark.django_db
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment