about summary refs log tree commit diff
path: root/tests/unit/db
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-09-30 11:02:37 +0300
committerBonfaceKilz2024-10-02 06:59:11 +0300
commit225f1f0976bbf3e0193cb935451a1c4ae76c77d9 (patch)
treeab88789546207a7146a9c7cecd00cc7510655da3 /tests/unit/db
parent04dc9fbcbce400265a916e8a60d358a26a22cb0b (diff)
downloadgenenetwork3-225f1f0976bbf3e0193cb935451a1c4ae76c77d9.tar.gz
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 <me@bonfacemunyoki.com>
Diffstat (limited to 'tests/unit/db')
-rw-r--r--tests/unit/db/rdf/test_wiki.py12
1 files changed, 6 insertions, 6 deletions
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,