From 6341aef0a78f4e9c8c6d753ec799c0bbbd53ff66 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 12 Sep 2022 07:28:44 +0300 Subject: Fix asserts: Use variable for assert --- test/requests/correlation_tests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') 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): -- cgit v1.2.3