From 49cf03fc212c813862453de5352436dc90d1e458 Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Thu, 15 Dec 2022 16:50:53 +0100 Subject: imports and init files --- test/base/test_extractor.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/base/test_extractor.py') 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() -- cgit v1.2.3