diff options
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 |
