Skip to content

Commit b7f4b72

Browse files
fix fuseki configs and PosixPath resolver
1 parent b1a98ef commit b7f4b72

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

ted_sws/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def FUSEKI_ADMIN_PASSWORD(self) -> str:
165165
return EnvConfigResolver().config_resolve()
166166

167167
@property
168-
def FUSEKI_HOST(self) -> str:
168+
def FUSEKI_ADMIN_HOST(self) -> str:
169169
return EnvConfigResolver().config_resolve()
170170

171171
class TedConfigResolver(MongoDBConfig, RMLMapperConfig, XMLProcessorConfig, ELKConfig, LoggingConfig,

ted_sws/data_manager/adapters/triple_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class FusekiException(Exception):
166166

167167
class FusekiAdapter(TripleStoreABC):
168168

169-
def __init__(self, host: str = config.FUSEKI_HOST,
169+
def __init__(self, host: str = config.FUSEKI_ADMIN_HOST,
170170
user: str = config.FUSEKI_ADMIN_USER,
171171
password: str = config.FUSEKI_ADMIN_PASSWORD):
172172

tests/e2e/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ def fake_mapping_suite_id() -> str:
3838

3939
@pytest.fixture
4040
def fuseki_triple_store():
41-
return FusekiAdapter(host=config.FUSEKI_HOST, user=config.FUSEKI_ADMIN_USER, password=config.FUSEKI_ADMIN_PASSWORD)
41+
return FusekiAdapter(host=config.FUSEKI_ADMIN_HOST, user=config.FUSEKI_ADMIN_USER, password=config.FUSEKI_ADMIN_PASSWORD)

tests/e2e/data_manager/test_fuseki_triple_store.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from ted_sws import config
66
from ted_sws.data_manager.adapters.triple_store import FusekiAdapter, FusekiException
7+
from tests import TEST_DATA_PATH
78
from tests.fakes.fake_repository import FakeNoticeRepository
89

910
REPOSITORY_NAME = "unknown_repository_123456677"
@@ -32,9 +33,16 @@ def test_fuseki_triple_store_connection():
3233

3334
def test_fuseki_triple_store_add_file_to_repository():
3435
triple_store = FusekiAdapter()
35-
triple_store.add_file_to_repository(Path("/home/mihai/work/meaningfy/ted-sws/tests/test_data/example.ttl"),
36+
rdf_file_path = TEST_DATA_PATH / "example.ttl"
37+
assert rdf_file_path.exists()
38+
triple_store.add_file_to_repository(rdf_file_path,
3639
repository_name="test1")
3740

41+
def test_my_test():
42+
print(config.FUSEKI_ADMIN_HOST)
43+
print(config.FUSEKI_ADMIN_USER)
44+
print(config.FUSEKI_ADMIN_PASSWORD)
45+
3846

3947
def test_fuseki_triple_store_get_sparql_endpoint(fuseki_triple_store):
4048
sparql_endpoint = fuseki_triple_store.get_sparql_triple_store_endpoint(repository_name="test1")

0 commit comments

Comments
 (0)