diff options
author | Matthias Baumgartner <dev@igsor.net> | 2022-12-22 20:33:00 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2022-12-22 20:33:00 +0100 |
commit | ca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d (patch) | |
tree | e6290053c00e06fda9e41ac0a602ff53d91a38ac /test/graph/ac/test_null.py | |
parent | 73e39cb4967949025aefe874f401e27b0abb772c (diff) | |
download | bsfs-ca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d.tar.gz bsfs-ca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d.tar.bz2 bsfs-ca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d.zip |
filter-ast based get interface in graph.
* Graph interface: Graph.get added
* Node instance resolver so that Nodes can be used in a filter ast
* AC interface: filter_read added to interface
* upstream test adjustments of previous sparql store changes
Diffstat (limited to 'test/graph/ac/test_null.py')
-rw-r--r-- | test/graph/ac/test_null.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/graph/ac/test_null.py b/test/graph/ac/test_null.py index f39c9be..c863943 100644 --- a/test/graph/ac/test_null.py +++ b/test/graph/ac/test_null.py @@ -10,6 +10,7 @@ import unittest # bsie imports from bsfs import schema as _schema from bsfs.namespace import ns +from bsfs.query import ast from bsfs.triple_store import SparqlStore from bsfs.utils import URI @@ -93,6 +94,15 @@ class TestNullAC(unittest.TestCase): ac = NullAC(self.backend, self.user) self.assertSetEqual(self.ent_ids, ac.createable(self.ent_type, self.ent_ids)) + def test_filter_read(self): + query = ast.filter.Or( + ast.filter.Any(ns.bse.tag, ast.filter.Is('http://example.com/tag#1234')), + ast.filter.Any(ns.bse.tag, ast.filter.Is('http://example.com/tag#4321')), + ast.filter.Any(ns.bse.author, ast.filter.Equals('Me, Myself, and I'))) + ac = NullAC(self.backend, self.user) + self.assertEqual(query, ac.filter_read(self.ent_type, query)) + return query + ## main ## |