@@ -12,11 +12,11 @@ class AdminAnonymousTests(HtmlAssertionMixin, TestCase):
12
12
"""
13
13
14
14
def test_login_en (self ):
15
- response = self .client .get ('/admin/' , secure = True , HTTP_ACCEPT_LANGUAGE = 'en' )
15
+ response = self .client .get ('/admin/' , secure = True , headers = { "accept-language" : 'en' } )
16
16
self .assertRedirects (response , expected_url = '/admin/login/?next=/admin/' , fetch_redirect_response = False )
17
17
18
18
def test_login_de (self ):
19
- response = self .client .get ('/admin/' , secure = True , HTTP_ACCEPT_LANGUAGE = 'de' )
19
+ response = self .client .get ('/admin/' , secure = True , headers = { "accept-language" : 'de' } )
20
20
self .assertRedirects (response , expected_url = '/admin/login/?next=/admin/' , fetch_redirect_response = False )
21
21
22
22
@@ -33,7 +33,7 @@ def setUpTestData(cls):
33
33
def test_staff_admin_index (self ):
34
34
self .client .force_login (self .staffuser )
35
35
36
- response = self .client .get ("/admin/" , secure = True , HTTP_ACCEPT_LANGUAGE = " en" )
36
+ response = self .client .get ("/admin/" , secure = True , headers = { "accept-language" : " en"} )
37
37
self .assert_html_parts (
38
38
response ,
39
39
parts = (
@@ -47,7 +47,7 @@ def test_staff_admin_index(self):
47
47
48
48
def test_superuser_admin_index (self ):
49
49
self .client .force_login (self .superuser )
50
- response = self .client .get ("/admin/" , secure = True , HTTP_ACCEPT_LANGUAGE = " en" )
50
+ response = self .client .get ("/admin/" , secure = True , headers = { "accept-language" : " en"} )
51
51
self .assert_html_parts (
52
52
response ,
53
53
parts = (
0 commit comments