From 7261e72ef791053c84a10711ec01b6c68ef56355 Mon Sep 17 00:00:00 2001 From: David Cermak Date: Sun, 26 Jan 2020 16:42:37 +0100 Subject: [PATCH] http_client: fix example test to expect -1 as content-len for chunked transfer --- examples/protocols/esp_http_client/esp_http_client_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/protocols/esp_http_client/esp_http_client_test.py b/examples/protocols/esp_http_client/esp_http_client_test.py index f11357c9f..a22047a90 100644 --- a/examples/protocols/esp_http_client/esp_http_client_test.py +++ b/examples/protocols/esp_http_client/esp_http_client_test.py @@ -33,7 +33,8 @@ def test_examples_protocol_esp_http_client(env, extra_data): dut1.expect(re.compile(r"HTTP Absolute path redirect Status = 200, content_length = (\d)")) dut1.expect(re.compile(r"HTTPS Status = 200, content_length = (\d)")) dut1.expect(re.compile(r"HTTP redirect to HTTPS Status = 200, content_length = (\d)"), timeout=10) - dut1.expect(re.compile(r"HTTP chunk encoding Status = 200, content_length = (\d)")) + dut1.expect(re.compile(r"HTTP chunk encoding Status = 200, content_length = (-?\d)")) + # content-len for chunked encoding is typically -1, could be a positive length in some cases dut1.expect(re.compile(r"HTTP Stream reader Status = 200, content_length = (\d)")) dut1.expect(re.compile(r"Last esp error code: 0x8001")) dut1.expect("Finish http example")