diff options
Diffstat (limited to 'test/triple_store/sparql/test_utils.py')
-rw-r--r-- | test/triple_store/sparql/test_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/triple_store/sparql/test_utils.py b/test/triple_store/sparql/test_utils.py index 073b8f8..edcf6d7 100644 --- a/test/triple_store/sparql/test_utils.py +++ b/test/triple_store/sparql/test_utils.py @@ -118,13 +118,13 @@ class TestQuery(unittest.TestCase): return value # query composes a valid query q = Query(self.root_type, self.root_head, self.select, self.where) - self.assertEqual(normalize(q.query), normalize(f'select ?root (?head as ?name) where {{ ?root <{ns.rdf.type}>/<{ns.rdfs.subClassOf}>* <http://bsfs.ai/schema/Entity> . ?root <{ns.bse.tag}> ?head }}')) + self.assertEqual(normalize(q.query), normalize(f'select distinct ?root (?head as ?name) where {{ ?root <{ns.rdf.type}>/<{ns.rdfs.subClassOf}>* <http://bsfs.ai/schema/Entity> . ?root <{ns.bse.tag}> ?head }} order by str(?root)')) # select and where are optional q = Query(self.root_type, self.root_head) - self.assertEqual(normalize(q.query), normalize(f'select ?root where {{ ?root <{ns.rdf.type}>/<{ns.rdfs.subClassOf}>* <http://bsfs.ai/schema/Entity> . }}')) + self.assertEqual(normalize(q.query), normalize(f'select distinct ?root where {{ ?root <{ns.rdf.type}>/<{ns.rdfs.subClassOf}>* <http://bsfs.ai/schema/Entity> . }} order by str(?root)')) # select and where need not to correspond q = Query(self.root_type, self.root_head, (('?head', 'name'), )) - self.assertEqual(normalize(q.query), normalize(f'select ?root (?head as ?name) where {{ ?root <{ns.rdf.type}>/<{ns.rdfs.subClassOf}>* <http://bsfs.ai/schema/Entity> . }}')) + self.assertEqual(normalize(q.query), normalize(f'select distinct ?root (?head as ?name) where {{ ?root <{ns.rdf.type}>/<{ns.rdfs.subClassOf}>* <http://bsfs.ai/schema/Entity> . }} order by str(?root)')) # query is used for string representation self.assertEqual(str(q), q.query) |