update testing.md - missing import

import for RequestsClient is missing in the docs
This commit is contained in:
Çağıl 2018-04-25 19:02:44 +01:00 committed by GitHub
parent a11938ce96
commit 2983f1c53a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,6 +201,7 @@ live environment. (See "Live tests" below.)
This exposes exactly the same interface as if you were using a requests session
directly.
from rest_framework.test import RequestsClient
client = RequestsClient()
response = client.get('http://testserver/users/')
assert response.status_code == 200