Skip to content

Commit af021e0

Browse files
Update fake_triple_store.py
1 parent e41c58d commit af021e0

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

tests/fakes/fake_triple_store.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
from typing import List, Tuple
22

33
import pandas as pd
4-
from rdflib import URIRef
5-
4+
import rdflib
65
from ted_sws.data_manager.adapters.sparql_endpoint import TripleStoreEndpointABC
76

87

98
class FakeTripleStoreEndpoint(TripleStoreEndpointABC):
10-
def fetch_rdf(self) -> List[Tuple[URIRef, URIRef, URIRef]]:
11-
return []
9+
def fetch_rdf(self) -> rdflib.Graph:
10+
return rdflib.Graph()
1211

1312
def with_query(self, sparql_query: str, substitution_variables: dict = None,
14-
sparql_prefixes: str = "") -> 'TripleStoreEndpointABC':
13+
sparql_prefixes: str = "") -> TripleStoreEndpointABC:
1514
return self
1615

1716
def with_query_from_file(self, sparql_query_file_path: str, substitution_variables: dict = None,
18-
prefixes: str = "") -> 'TripleStoreEndpointABC':
17+
prefixes: str = "") -> TripleStoreEndpointABC:
1918
return self
2019

2120
def fetch_tabular(self) -> pd.DataFrame:

0 commit comments

Comments
 (0)