()
| 278 | |
| 279 | |
| 280 | def test_bad_environ_raises_bad_request(): |
| 281 | app = flask.Flask(__name__) |
| 282 | |
| 283 | from flask.testing import EnvironBuilder |
| 284 | |
| 285 | builder = EnvironBuilder(app) |
| 286 | environ = builder.get_environ() |
| 287 | |
| 288 | # use a non-printable character in the Host - this is key to this test |
| 289 | environ["HTTP_HOST"] = "\x8a" |
| 290 | |
| 291 | with app.request_context(environ): |
| 292 | response = app.full_dispatch_request() |
| 293 | assert response.status_code == 400 |
| 294 | |
| 295 | |
| 296 | def test_environ_for_valid_idna_completes(): |
nothing calls this directly
no test coverage detected