@@ -12,11 +12,11 @@ class AdminAnonymousTests(HtmlAssertionMixin, TestCase):
1212 """
1313
1414 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' } )
1616 self .assertRedirects (response , expected_url = '/admin/login/?next=/admin/' , fetch_redirect_response = False )
1717
1818 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' } )
2020 self .assertRedirects (response , expected_url = '/admin/login/?next=/admin/' , fetch_redirect_response = False )
2121
2222
@@ -33,7 +33,7 @@ def setUpTestData(cls):
3333 def test_staff_admin_index (self ):
3434 self .client .force_login (self .staffuser )
3535
36- response = self .client .get ("/admin/" , secure = True , HTTP_ACCEPT_LANGUAGE = " en" )
36+ response = self .client .get ("/admin/" , secure = True , headers = { "accept-language" : " en"} )
3737 self .assert_html_parts (
3838 response ,
3939 parts = (
@@ -47,7 +47,7 @@ def test_staff_admin_index(self):
4747
4848 def test_superuser_admin_index (self ):
4949 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"} )
5151 self .assert_html_parts (
5252 response ,
5353 parts = (
0 commit comments