aboutsummaryrefslogtreecommitdiffstats
path: root/test/base/test_extractor.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/base/test_extractor.py')
-rw-r--r--test/base/test_extractor.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/base/test_extractor.py b/test/base/test_extractor.py
index be876ad..5410ae0 100644
--- a/test/base/test_extractor.py
+++ b/test/base/test_extractor.py
@@ -8,8 +8,7 @@ Author: Matthias Baumgartner, 2022
import unittest
# bsie imports
-from bsie.utils import ns
-from bsie.utils.bsfs import schema as _schema, URI
+from bsie.utils import bsfs, ns
# objects to test
from bsie.base import extractor
@@ -19,7 +18,7 @@ from bsie.base import extractor
class StubExtractor(extractor.Extractor):
def __init__(self):
- super().__init__(_schema.Schema.from_string(extractor.SCHEMA_PREAMBLE + '''
+ super().__init__(bsfs.schema.Schema.from_string(extractor.SCHEMA_PREAMBLE + '''
bse:author rdfs:subClassOf bsfs:Predicate ;
rdfs:domain bsfs:Entity ;
rdfs:range xsd:string ;
@@ -53,9 +52,9 @@ class TestExtractor(unittest.TestCase):
self.assertNotEqual(hash(ext), hash(sub))
def test_predicates(self):
- schema = _schema.Schema.Empty()
+ schema = bsfs.schema.Schema.Empty()
entity = schema.node(ns.bsfs.Node).get_child(ns.bsfs.Entity)
- string = schema.literal(ns.bsfs.Literal).get_child(URI('http://www.w3.org/2001/XMLSchema#string'))
+ string = schema.literal(ns.bsfs.Literal).get_child(bsfs.URI('http://www.w3.org/2001/XMLSchema#string'))
p_author = schema.predicate(ns.bsfs.Predicate).get_child(ns.bse.author, domain=entity, range=string)
p_comment = schema.predicate(ns.bsfs.Predicate).get_child(ns.bse.comment, domain=entity, range=string)
ext = StubExtractor()