(self)
| 214 | out) |
| 215 | |
| 216 | def test_cp1252_url(self): |
| 217 | def app(e, s): |
| 218 | s("200 OK", [ |
| 219 | ("Content-Type", "text/plain"), |
| 220 | ("Date", "Wed, 24 Dec 2008 13:29:32 GMT"), |
| 221 | ]) |
| 222 | # PEP3333 says environ variables are decoded as latin1. |
| 223 | # Encode as latin1 to get original bytes |
| 224 | return [e["PATH_INFO"].encode("latin1")] |
| 225 | |
| 226 | out, err = run_amock( |
| 227 | validator(app), data=b"GET /\x80%80 HTTP/1.0") |
| 228 | self.assertEqual( |
| 229 | [ |
| 230 | b"HTTP/1.0 200 OK", |
| 231 | mock.ANY, |
| 232 | b"Content-Type: text/plain", |
| 233 | b"Date: Wed, 24 Dec 2008 13:29:32 GMT", |
| 234 | b"", |
| 235 | b"/\x80\x80", |
| 236 | ], |
| 237 | out.splitlines()) |
| 238 | |
| 239 | def test_interrupted_write(self): |
| 240 | # BaseHandler._write() and _flush() have to write all data, even if |
nothing calls this directly
no test coverage detected