aboutsummaryrefslogtreecommitdiff
path: root/test/requests/main_web_functionality.py
diff options
context:
space:
mode:
authorzsloan2022-09-06 13:32:28 -0500
committerGitHub2022-09-06 13:32:28 -0500
commitd8bc7067b717e0b680d98b7cfcbc26c758a109bf (patch)
tree571677761b3bb464b55bc19f208f135214321ad2 /test/requests/main_web_functionality.py
parente0626f40d8fe4fa83daba52b82c1b459b34b1849 (diff)
parent363237f11b9eb14f52c4f0c43a931c99c827c496 (diff)
downloadgenenetwork2-d8bc7067b717e0b680d98b7cfcbc26c758a109bf.tar.gz
Merge branch 'testing' into feature/generalize_tables
Diffstat (limited to 'test/requests/main_web_functionality.py')
-rw-r--r--test/requests/main_web_functionality.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/requests/main_web_functionality.py b/test/requests/main_web_functionality.py
index 28033ad5..79f37bb4 100644
--- a/test/requests/main_web_functionality.py
+++ b/test/requests/main_web_functionality.py
@@ -1,10 +1,11 @@
import requests
-from lxml.html import parse
+from lxml.html import document_fromstring
from link_checker import check_page
def check_home(url):
- doc = parse(url).getroot()
+ results = requests.get(url)
+ doc = document_fromstring(results.text)
search_button = doc.cssselect("#btsearch")
assert(search_button[0].value == "Search")
print("OK")
@@ -18,7 +19,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 were found")
+ found = result.text.find("records found")
assert(found >= 0)
assert(result.status_code == 200)
print("OK")
@@ -27,7 +28,8 @@ def check_search_page(host):
def check_traits_page(host, traits_url):
- doc = parse(host+traits_url).getroot()
+ results = requests.get(host+traits_url)
+ doc = document_fromstring(results.text)
traits_form = doc.forms[1]
assert(traits_form.fields["corr_dataset"] == "HC_M2_0606_P")
print("OK")