aboutsummaryrefslogtreecommitdiffstats
path: root/test/graph/ac/test_null.py
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2022-12-22 20:35:15 +0100
committerMatthias Baumgartner <dev@igsor.net>2022-12-22 20:35:15 +0100
commit9ab60f915fa53ae2ac2cf06b2f68138ffaa534d4 (patch)
treee6290053c00e06fda9e41ac0a602ff53d91a38ac /test/graph/ac/test_null.py
parente94368c75468e3e94382b12705e55d396249eaca (diff)
parentca7ee6c59d2eb3f4ec4d16e392d12d946cd85e4d (diff)
downloadbsfs-9ab60f915fa53ae2ac2cf06b2f68138ffaa534d4.tar.gz
bsfs-9ab60f915fa53ae2ac2cf06b2f68138ffaa534d4.tar.bz2
bsfs-9ab60f915fa53ae2ac2cf06b2f68138ffaa534d4.zip
Merge branch 'mb/filter' into develop
Diffstat (limited to 'test/graph/ac/test_null.py')
-rw-r--r--test/graph/ac/test_null.py10
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 ##