From 225f1f0976bbf3e0193cb935451a1c4ae76c77d9 Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 30 Sep 2024 11:02:37 +0300 Subject: Set a default password for sparql. * tests/fixtures/rdf.py: Import config. (get_sparql_auth_conf): Load GN3 config from GN3_SECRETS and GN3_CONF if the respective envs are set. Set sane defaults for sparql_conf. (rdf_setup): Remove "fxtr_app_config". * tests/unit/db/rdf/test_wiki.py (test_get_wiki_entries_by_symbol): Ditto. (test_get_comment_history): Ditto. (test_update_wiki_comment): Ditto. Signed-off-by: Munyoki Kilyungi --- tests/unit/db/rdf/test_wiki.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/db/rdf/test_wiki.py b/tests/unit/db/rdf/test_wiki.py index 7627dbf..8dd4f3a 100644 --- a/tests/unit/db/rdf/test_wiki.py +++ b/tests/unit/db/rdf/test_wiki.py @@ -185,9 +185,9 @@ def test_sanitize_result(result, expected): @pytest.mark.rdf -def test_get_wiki_entries_by_symbol(fxtr_app_config, rdf_setup): # pylint: disable=W0613,W0621 +def test_get_wiki_entries_by_symbol(rdf_setup): # pylint: disable=W0613,W0621 """Test that wiki entries are fetched correctly by symbol""" - sparql_conf = get_sparql_auth_conf(fxtr_app_config) + sparql_conf = get_sparql_auth_conf() result = get_wiki_entries_by_symbol( symbol="ckb", sparql_uri=sparql_conf["sparql_endpoint"], @@ -260,9 +260,9 @@ and C1QL3 (CTRP13).", @pytest.mark.rdf -def test_get_comment_history(fxtr_app_config, rdf_setup): # pylint: disable=W0613,W0621 +def test_get_comment_history(rdf_setup): # pylint: disable=W0613,W0621 """Test fetching a comment's history from RDF""" - sparql_conf = get_sparql_auth_conf(fxtr_app_config) + sparql_conf = get_sparql_auth_conf() result = get_comment_history( comment_id=1158, sparql_uri=sparql_conf["sparql_endpoint"], @@ -353,9 +353,9 @@ Possible 3' UTR variants.", @pytest.mark.rdf -def test_update_wiki_comment(fxtr_app_config, rdf_setup): # pylint: disable=W0613,W0621 +def test_update_wiki_comment(rdf_setup): # pylint: disable=W0613,W0621 """Test that a comment is updated correctly""" - sparql_conf = get_sparql_auth_conf(fxtr_app_config) + sparql_conf = get_sparql_auth_conf() update_wiki_comment( insert_dict={ "Id": 230, -- cgit v1.2.3