Skip to content
Myr

Merge branch 'stable'

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parents e4e4bf6, a31e6b7 · Browse files · 1 file+0 added−28 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+0 added−28 removed

  • tests:+0 added−28 removed

1 file+0 added−28 removed

modified:tests/test_reqctx.py-28 removed
273 unmodified lines
274 # now check that the relevant values come back - meaning that different275 # cookies are being used for the urls that end with "dynamic cookie"276 assert test_client.get("/get").data == b"42"277 assert test_client.get("/get_dynamic_cookie").data == b"616"278279280def test_bad_environ_raises_bad_request():281 app = flask.Flask(__name__)282283 from flask.testing import EnvironBuilder284285 builder = EnvironBuilder(app)286 environ = builder.get_environ()287288 # use a non-printable character in the Host - this is key to this test289 environ["HTTP_HOST"] = "\x8a"290291 with app.request_context(environ) as ctx:292 response = app.full_dispatch_request(ctx)293294 assert response.status_code == 400295296297def test_normal_environ_completes():298 app = flask.Flask(__name__)299300 @app.route("/")301 def index():302 return "Hello World!"303304 response = app.test_client().get("/", headers={"host": "xn--on-0ia.com"})305 assert response.status_code == 200