make test_no_auto_head_option test more explicit

This commit is contained in:
malwaredllc 2022-01-05 12:05:57 -07:00
parent 7a4c9772be
commit c3a8f8e611

View file

@ -2035,5 +2035,10 @@ def test_no_auto_head_option(app, client):
def index_head(): def index_head():
return "", 200, {"test-header": "test-value"} return "", 200, {"test-header": "test-value"}
assert client.get("/").data == b"Hello world" rv = client.get("/")
assert "test-header" in client.head("/").headers assert rv.data == b"Hello world"
assert "test-header" not in rv.headers
rv = client.head("/")
assert rv.data == b""
assert "test-header" in rv.headers