diff options
| author | Claude Paroz <claude@2xlibre.net> | 2019-12-15 15:30:35 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-01-27 08:52:40 +0100 |
| commit | 7fa0fa45c5786619409036c5adce52ff6189b0ac (patch) | |
| tree | e5cd944e176d80daf8748f1e5cb435344ebdb808 /docs/topics/testing | |
| parent | 5d654e1e7104d2ce86ec1b9fe52865a7dca4b4be (diff) | |
Refs #30997 -- Removed HttpRequest.is_ajax() usage.
Diffstat (limited to 'docs/topics/testing')
| -rw-r--r-- | docs/topics/testing/tools.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 2556670904..59f36d44b8 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -159,11 +159,11 @@ Use the ``django.test.Client`` class to make requests. >>> c = Client() >>> c.get('/customers/details/', {'name': 'fred', 'age': 7}, - ... HTTP_X_REQUESTED_WITH='XMLHttpRequest') + ... HTTP_ACCEPT='application/json') - ...will send the HTTP header ``HTTP_X_REQUESTED_WITH`` to the - details view, which is a good way to test code paths that use the - :meth:`django.http.HttpRequest.is_ajax()` method. + ...will send the HTTP header ``HTTP_ACCEPT`` to the details view, which + is a good way to test code paths that use the + :meth:`django.http.HttpRequest.accepts()` method. .. admonition:: CGI specification |
