From 1a12ad4c9151f357daafdf7396202fa4ab2f9f14 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Thu, 25 Nov 2021 15:48:08 +0000 Subject: [PATCH] test: adapting http2 test 200_16 to compensate for not getting a response. This happens for newer nghttp2 versions that RST a stream with the tested, invalid header. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1895334 13f79535-47bb-0310-9956-ffa450edef68 --- test/modules/http2/test_200_header_invalid.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/modules/http2/test_200_header_invalid.py b/test/modules/http2/test_200_header_invalid.py index f0fe3772726..796b0b44bb7 100644 --- a/test/modules/http2/test_200_header_invalid.py +++ b/test/modules/http2/test_200_header_invalid.py @@ -168,10 +168,10 @@ class TestStore: opt = ["-H:method: GET /hello.py"] r = env.nghttp().get(url, options=opt) assert r.exit_code == 0, r - assert r.response - assert r.response["status"] == 400 + if r.response: + assert r.response["status"] == 400 url = env.mkurl("https", "cgi", "/proxy/hello.py") r = env.nghttp().get(url, options=opt) assert r.exit_code == 0, r - assert r.response - assert r.response["status"] == 400 + if r.response: + assert r.response["status"] == 400 -- 2.47.2