about summary refs log tree commit diff
path: root/test/requests
diff options
context:
space:
mode:
authorzsloan2020-07-24 20:16:17 -0500
committerGitHub2020-07-24 20:16:17 -0500
commitf66da35a09cbb8da13cfb142cbe3ff208404970b (patch)
treeb05021c6e7b9f83c63257fec63414ecefa36668e /test/requests
parent60d8968c4fc2ca15fc9cf2f63c0b34a25f6fb053 (diff)
parent5eb26c5a209f3a3c54cf6fe623e5372188bdd1bc (diff)
downloadgenenetwork2-f66da35a09cbb8da13cfb142cbe3ff208404970b.tar.gz
Merge pull request #409 from BonfaceKilz/Build/add-tests
Build/add tests
Diffstat (limited to 'test/requests')
-rw-r--r--test/requests/main_web_functionality.py3
-rw-r--r--test/requests/mapping_tests.py12
-rwxr-xr-xtest/requests/test-website.py11
3 files changed, 9 insertions, 17 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")
 
diff --git a/test/requests/mapping_tests.py b/test/requests/mapping_tests.py
index 6de81bfe..5748a2a3 100644
--- a/test/requests/mapping_tests.py
+++ b/test/requests/mapping_tests.py
@@ -15,9 +15,9 @@ def check_R_qtl_tool_selection(host, data):
     print("")
     print("R/qtl mapping tool selection")
     headers = {"Content-Type": "application/x-www-form-urlencoded"}
-    page = requests.post(host+"/marker_regression", data=data, headers=headers)
+    page = requests.post(host+"/loading", data=data, headers=headers)
     doc = fromstring(page.text)
-    form = doc.forms[1]
+    form = doc.forms[0]
     assert form.fields["dataset"] == "HC_M2_0606_P"
     assert form.fields["value:BXD1"] == "15.034"
 
@@ -25,9 +25,9 @@ def check_CIM_tool_selection(host, data):
     print("")
     print("CIM mapping tool selection (using reaper)")
     data["method"] = "reaper"
-    page = requests.post(host+"/marker_regression", data=data)
+    page = requests.post(host+"/loading", data=data)
     doc = fromstring(page.text)
-    form = doc.forms[1]
+    form = doc.forms[0]
     assert form.fields["dataset"] == "HC_M2_0606_P"
     assert form.fields["value:BXD1"] == "15.034"
 
@@ -37,6 +37,6 @@ def check_mapping(args_obj, parser):
 
     host = args_obj.host
     data = load_data_from_file()
-    check_pylmm_tool_selection(host, copy.deepcopy(data))
-    check_R_qtl_tool_selection(host, copy.deepcopy(data)) ## Why does this fail?
+    # check_pylmm_tool_selection(host, copy.deepcopy(data)) ## Not defined
+    check_R_qtl_tool_selection(host, copy.deepcopy(data))
     check_CIM_tool_selection(host, copy.deepcopy(data))
diff --git a/test/requests/test-website.py b/test/requests/test-website.py
index b2e09bc4..74057e7f 100755
--- a/test/requests/test-website.py
+++ b/test/requests/test-website.py
@@ -104,16 +104,7 @@ parser.add_argument("-i", "--integration-tests", dest="accumulate"
                     , action="store_const", const=integration_tests, default=print_help
                     , help="Runs integration tests.")
 
-# Navigation tests deactivated since system relies on Javascript
-# parser.add_argument("-n", "--navigation", dest="accumulate"
-#                     , action="store_const", const=check_navigation, default=print_help
-#                     , help="Checks for navigation.")
-
-# parser.add_argument("-s", "--skip-broken", dest="accumulate"
-#                     , action="store_const", const=dummy, default=print_help
-#                     , help="Skip tests that are known to be broken.")
-
 args = parser.parse_args()
-# print("The arguments object: ", args)
+
 
 args.accumulate(args, parser)