diff options
author | BonfaceKilz | 2020-07-16 16:14:50 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-07-16 16:24:22 +0300 |
commit | d9bd69a8bd2e92d4aac078d936917929f2e5ca8e (patch) | |
tree | a28388be459218f813a371e1d386c97130d117df | |
parent | abce41e1408ad9e43328b133be9eeebc19b6802b (diff) | |
download | genenetwork2-d9bd69a8bd2e92d4aac078d936917929f2e5ca8e.tar.gz |
Check for specific text in response and then assert a 200 code
"/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P" is missing in the
response code. At one point the html structure changed.
-rw-r--r-- | test/requests/main_web_functionality.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/requests/main_web_functionality.py b/test/requests/main_web_functionality.py index 7b89b833..d070dab9 100644 --- a/test/requests/main_web_functionality.py +++ b/test/requests/main_web_functionality.py @@ -20,8 +20,9 @@ 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("/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P") + found = result.text.find("records are shown below") assert(found >= 0) + assert(result.status_code == 200) print("OK") check_traits_page(host, "/show_trait?trait_id=1435395_s_at&dataset=HC_M2_0606_P") |