Fix test assertions(broken when migrated to pytest)

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-12-06 20:25:25 +00:00
parent c083f4448a
commit 48ee392cbe
No known key found for this signature in database
GPG key ID: BB36BF6584A298FF

View file

@ -1,3 +1,5 @@
import sys
import pytest
import requests
from pytestshellutils.utils import ports
@ -152,7 +154,10 @@ def test_query_null_response():
url = f"http://{host}:{port}/"
result = http.query(url, raise_error=False)
assert result == {"body": None}, result
if sys.platform.startswith("win"):
assert result == {"error": "[Errno 10061] Unknown error"}, result
else:
assert result == {"error": "[Errno 111] Connection refused"}
def test_query_error_handling():