@@ -101,7 +101,7 @@ def setUpTestData(cls):
101101 DocumentRelease .objects .create (lang = "en" , release = r2 , is_default = True )
102102
103103 def test_docs_host_excluded (self ):
104- "We get no Content-Language or Vary headers when docs host is excluded"
104+ """ 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 })
107107
@@ -135,7 +135,7 @@ def test_docs_host_forwarded_excluded(self):
135135 self .assertNotIn ("Vary" , resp )
136136
137137 def test_docs_host_not_excluded (self ):
138- "We still get Content-Language when docs host is not excluded"
138+ """ We still get Content-Language when docs host is not excluded"" "
139139 with self .settings (LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = []):
140140 resp = self .client .get ("/" , headers = {"host" : self .docs_host })
141141
@@ -144,15 +144,15 @@ def test_docs_host_not_excluded(self):
144144 self .assertIn ("Vary" , resp )
145145
146146 def test_www_host (self ):
147- "www should still use LocaleMiddleware"
147+ """ www should still use LocaleMiddleware"" "
148148 with self .settings (LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = [self .docs_host ]):
149149 resp = self .client .get ("/" , headers = {"host" : self .www_host })
150150 self .assertEqual (resp .status_code , HTTPStatus .OK )
151151 self .assertIn ("Content-Language" , resp )
152152 self .assertIn ("Vary" , resp )
153153
154154 def test_www_host_with_port (self ):
155- "www (with a port) should still use LocaleMiddleware"
155+ """ www (with a port) should still use LocaleMiddleware"" "
156156 with self .settings (LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = [self .docs_host ]):
157157 resp = self .client .get ("/" , headers = {"host" : "%s:8000" % self .www_host })
158158 self .assertEqual (resp .status_code , HTTPStatus .OK )
0 commit comments