@@ -104,7 +104,8 @@ def test_docs_host_excluded(self):
104104 "We get no Content-Language or Vary headers when docs host is excluded"
105105 with self .settings (LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = [self .docs_host ]):
106106 resp = self .client .get ("/" , headers = {"host" : self .docs_host })
107- self .assertEqual (resp .status_code , HTTPStatus .FOUND )
107+
108+ self .assertEqual (resp .status_code , HTTPStatus .OK )
108109 self .assertNotIn ("Content-Language" , resp )
109110 self .assertNotIn ("Vary" , resp )
110111
@@ -128,15 +129,17 @@ def test_docs_host_forwarded_excluded(self):
128129 LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = [self .docs_host ], USE_X_FORWARDED_HOST = True
129130 ):
130131 resp = self .client .get ("/" , headers = {"x-forwarded-host" : self .docs_host })
131- self .assertEqual (resp .status_code , HTTPStatus .FOUND )
132+
133+ self .assertEqual (resp .status_code , HTTPStatus .OK )
132134 self .assertNotIn ("Content-Language" , resp )
133135 self .assertNotIn ("Vary" , resp )
134136
135137 def test_docs_host_not_excluded (self ):
136138 "We still get Content-Language when docs host is not excluded"
137139 with self .settings (LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = []):
138140 resp = self .client .get ("/" , headers = {"host" : self .docs_host })
139- self .assertEqual (resp .status_code , HTTPStatus .FOUND )
141+
142+ self .assertEqual (resp .status_code , HTTPStatus .OK )
140143 self .assertIn ("Content-Language" , resp )
141144 self .assertIn ("Vary" , resp )
142145
0 commit comments