fix(esp_http_client): Add test case in esp_http_client example

Add a test case in esp_http_client example to test HTTP_METHOD_HEAD
with async mode
This commit is contained in:
Harshit Malpani
2023-12-22 16:20:24 +05:30
committed by Mahavir Jain
parent 2060f3a645
commit fd859d8931
2 changed files with 27 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ def test_examples_protocol_esp_http_client(dut: Dut) -> None:
# content-len for chunked encoding is typically -1, could be a positive length in some cases
dut.expect(r'HTTP Stream reader Status = 200, content_length = (\d)')
dut.expect(r'HTTPS Status = 200, content_length = (\d)')
dut.expect(r'HTTPS Status = 200, content_length = (\d)')
dut.expect(r'Last esp error code: 0x8001')
dut.expect(r'HTTP GET Status = 200, content_length = (\d)')
dut.expect(r'HTTP POST Status = 200, content_length = (\d)')
@@ -91,6 +92,7 @@ def test_examples_protocol_esp_http_client_dynamic_buffer(dut: Dut) -> None:
# content-len for chunked encoding is typically -1, could be a positive length in some cases
dut.expect(r'HTTP Stream reader Status = 200, content_length = (\d)')
dut.expect(r'HTTPS Status = 200, content_length = (\d)')
dut.expect(r'HTTPS Status = 200, content_length = (\d)')
dut.expect(r'Last esp error code: 0x8001')
dut.expect(r'HTTP GET Status = 200, content_length = (\d)')
dut.expect(r'HTTP POST Status = 200, content_length = (\d)')