(self)
| 195 | "The warning message should say something about QUERY_STRING") |
| 196 | |
| 197 | def test_no_valid_request(self): |
| 198 | environ = { |
| 199 | 'REQUEST_METHOD': 'PROPFIND', |
| 200 | 'SERVER_NAME': 'localhost', |
| 201 | 'SERVER_PORT': '80', |
| 202 | 'wsgi.version': (1, 0, 1), |
| 203 | 'wsgi.input': StringIO('test'), |
| 204 | 'wsgi.errors': StringIO(), |
| 205 | 'wsgi.multithread': None, |
| 206 | 'wsgi.multiprocess': None, |
| 207 | 'wsgi.run_once': None, |
| 208 | 'wsgi.url_scheme': 'http', |
| 209 | 'PATH_INFO': '/', |
| 210 | 'QUERY_STRING': '', |
| 211 | } |
| 212 | with warnings.catch_warnings(record=True) as w: |
| 213 | warnings.simplefilter("always") |
| 214 | check_environ(environ) |
| 215 | self.assertEqual(len(w), 1, "We should have only one warning") |
| 216 | self.assertTrue( |
| 217 | "REQUEST_METHOD" in str(w[-1].message), |
| 218 | "The warning message should say something " |
| 219 | "about REQUEST_METHOD") |
| 220 | |
| 221 | def test_handles_native_strings_in_variables(self): |
| 222 | path = '/umläut' |
nothing calls this directly
no test coverage detected