Commit b04c4223 authored by kaiyou's avatar kaiyou

Fix the http check and providing an expected string

parent c867f48f
Pipeline #153 passed with stage
in 1 minute
......@@ -12,7 +12,7 @@ def get(context, url, expected_code=200, expected_string=None):
if expected_code != req.status_code:
up = False
message = "the page returned code {}".format(req.status_code)
elif req and expected_string:
elif req and expected_string and expected_string in req.text:
up = False
message = "string {} not found in the response".format(expected_string)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment