mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fixed some comments referring to a nonexistent TestClient class.
This commit is contained in:
parent
8b5a29800c
commit
ffbee67f8e
@ -245,9 +245,9 @@ class SimpleTestCase(unittest.TestCase):
|
||||
Assert that a response redirected to a specific URL and that the
|
||||
redirect URL can be loaded.
|
||||
|
||||
Won't work for external links since it uses TestClient to do a request
|
||||
(use fetch_redirect_response=False to check such links without fetching
|
||||
them).
|
||||
Won't work for external links since it uses the test client to do a
|
||||
request (use fetch_redirect_response=False to check such links without
|
||||
fetching them).
|
||||
"""
|
||||
if msg_prefix:
|
||||
msg_prefix += ": "
|
||||
|
@ -641,7 +641,7 @@ class LoginTest(AuthViewsTestCase):
|
||||
Makes sure that a login rotates the currently-used CSRF token.
|
||||
"""
|
||||
# Do a GET to establish a CSRF token
|
||||
# TestClient isn't used here as we're testing middleware, essentially.
|
||||
# The test client isn't used here as it's a test for middleware.
|
||||
req = HttpRequest()
|
||||
CsrfViewMiddleware().process_view(req, LoginView.as_view(), (), {})
|
||||
# get_token() triggers CSRF token inclusion in the response
|
||||
|
Loading…
Reference in New Issue
Block a user