mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 19:40:13 +03:00
update testing.md - missing import
import for RequestsClient is missing in the docs
This commit is contained in:
parent
a11938ce96
commit
2983f1c53a
|
@ -201,6 +201,7 @@ live environment. (See "Live tests" below.)
|
||||||
This exposes exactly the same interface as if you were using a requests session
|
This exposes exactly the same interface as if you were using a requests session
|
||||||
directly.
|
directly.
|
||||||
|
|
||||||
|
from rest_framework.test import RequestsClient
|
||||||
client = RequestsClient()
|
client = RequestsClient()
|
||||||
response = client.get('http://testserver/users/')
|
response = client.get('http://testserver/users/')
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
|
|
Loading…
Reference in New Issue
Block a user