diff options
author | BonfaceKilz | 2020-09-17 21:19:00 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-09-17 21:25:35 +0300 |
commit | d52cc25d120173de3fd16bbd42ea38498d458e35 (patch) | |
tree | 1ebad8627f83b63e2f209a4514540674179f7b0c /test/requests | |
parent | bfb5fab5ac57934f7a6bd54938188fa0d2669ad7 (diff) | |
download | genenetwork2-d52cc25d120173de3fd16bbd42ea38498d458e35.tar.gz |
Update Mechanical Rob
* test/requests/link_checker.py (verify_static_file): Cast
result.content.find's args to bytes.
* test/requests/main_web_functionality.py (check_search_page): Update
text to search for in a successful result. This value changed in
2aac6a06.
Diffstat (limited to 'test/requests')
-rw-r--r-- | test/requests/link_checker.py | 2 | ||||
-rw-r--r-- | test/requests/main_web_functionality.py | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/test/requests/link_checker.py b/test/requests/link_checker.py index e9943492..6ac26ba7 100644 --- a/test/requests/link_checker.py +++ b/test/requests/link_checker.py @@ -54,7 +54,7 @@ def verify_static_file(link): try: result = requests.get(link, timeout=20, verify=False) if (result.status_code == 200 and - result.content.find("Error: 404 Not Found") <= 0): + result.content.find(bytes("Error: 404 Not Found", "utf-8")) <= 0): print(link+" ==> OK") else: print("ERROR: link {}".format(link)) diff --git a/test/requests/main_web_functionality.py b/test/requests/main_web_functionality.py index 78030307..cefb8b8c 100644 --- a/test/requests/main_web_functionality.py +++ b/test/requests/main_web_functionality.py @@ -9,7 +9,6 @@ def check_home(url): assert(search_button[0].value == "Search") print("OK") - def check_search_page(host): data = dict( species="mouse", @@ -19,7 +18,7 @@ def check_search_page(host): search_terms_or="", search_terms_and="MEAN=(15 16) LRS=(23 46)") result = requests.get(host+"/search", params=data) - found = result.text.find("records are shown below") + found = result.text.find("records were found.") assert(found >= 0) assert(result.status_code == 200) print("OK") |