diff options
Diffstat (limited to 'test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py')
-rw-r--r-- | test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py new file mode 100644 index 000000000..0d1d928b5 --- /dev/null +++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/HttpRequests.py @@ -0,0 +1,12 @@ +import requests +from robot.api import logger + +def session_without_env(): + session = requests.Session() + session.trust_env = False + return session + +def checkStatusCode(status_code, server_name): + if status_code != 200: + logger.error("Response status code from " + server_name + ": " + str(status_code)) + raise (Exception(server_name + " returned status code " + status_code))
\ No newline at end of file |