From c3a8f8e611bd8ed8fd98bf6e0813b34fafb1b026 Mon Sep 17 00:00:00 2001 From: malwaredllc <30509968+malwaredllc@users.noreply.github.com> Date: Wed, 5 Jan 2022 12:05:57 -0700 Subject: [PATCH] make test_no_auto_head_option test more explicit --- tests/test_basic.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_basic.py b/tests/test_basic.py index b6014825..57af3c3b 100644 --- a/tests/test_basic.py +++ b/tests/test_basic.py @@ -2035,5 +2035,10 @@ def test_no_auto_head_option(app, client): def index_head(): return "", 200, {"test-header": "test-value"} - assert client.get("/").data == b"Hello world" - assert "test-header" in client.head("/").headers + rv = client.get("/") + 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