diff options
Diffstat (limited to 'docs/topics/testing/tools.txt')
| -rw-r--r-- | docs/topics/testing/tools.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index ff34e81b8f..139d66e64b 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -682,7 +682,7 @@ a name of :setting:`LANGUAGE_COOKIE_NAME` and a value of the language code:: or by including the ``Accept-Language`` HTTP header in the request:: def test_language_using_header(self): - response = self.client.get('/', HTTP_ACCEPT_LANGUAGE='fr') + response = self.client.get("/", headers={"accept-language": "fr"}) self.assertEqual(response.content, b"Bienvenue sur mon site.") More details are in :ref:`how-django-discovers-language-preference`. |
