aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-09-12 07:28:44 +0300
committerFrederick Muriuki Muriithi2022-09-12 07:28:44 +0300
commit6341aef0a78f4e9c8c6d753ec799c0bbbd53ff66 (patch)
treea42cc3c3980e5e81145b597da8ec4013c3cfbd2b
parenta0ce616c7daae7b476f07b8c069a526f92dbf79a (diff)
downloadgenenetwork2-6341aef0a78f4e9c8c6d753ec799c0bbbd53ff66.tar.gz
Fix asserts: Use variable for assert
-rw-r--r--test/requests/correlation_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/requests/correlation_tests.py b/test/requests/correlation_tests.py
index 38979abc..320af74a 100644
--- a/test/requests/correlation_tests.py
+++ b/test/requests/correlation_tests.py
@@ -44,7 +44,7 @@ def check_sample_correlations(baseurl, base_data):
top_n_message = "The top 200 correlations ranked by the Genetic Correlation"
result = do_request(f"{baseurl}/corr_compute", data)
assert result.status_code == 200
- assert (result.text.find("Values of record 1435464_at") >= 0), result.text
+ assert (result.text.find(f"Values of record {base_data['trait_id']}") >= 0), result.text
assert (result.text.find(top_n_message) >= 0), result.text
def check_tissue_correlations(baseurl, base_data):
@@ -56,7 +56,7 @@ def check_tissue_correlations(baseurl, base_data):
top_n_message = "The top 100 correlations ranked by the Tissue Correlation"
result = do_request(f"{baseurl}/corr_compute", data)
assert result.status_code == 200
- assert (result.text.find("Values of record 1435464_at") >= 0), result.text
+ assert (result.text.find(f"Values of record {base_data['trait_id']}") >= 0), result.text
assert (result.text.find(top_n_message) >= 0), result.text
def check_lit_correlations(baseurl, base_data):
@@ -68,7 +68,7 @@ def check_lit_correlations(baseurl, base_data):
top_n_message = "The top 200 correlations ranked by the Literature Correlation"
result = do_request(f"{baseurl}/corr_compute", data)
assert result.status_code == 200
- assert (result.text.find("Values of record 1435464_at") >= 0), result.text
+ assert (result.text.find(f"Values of record {base_data['trait_id']}") >= 0), result.text
assert (result.text.find(top_n_message) >= 0), result.text
def check_correlations(args_obj, parser):