aboutsummaryrefslogtreecommitdiffstats
path: root/test/extractor/test_base.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/extractor/test_base.py')
-rw-r--r--test/extractor/test_base.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/extractor/test_base.py b/test/extractor/test_base.py
index 6a63c59..acfaf58 100644
--- a/test/extractor/test_base.py
+++ b/test/extractor/test_base.py
@@ -18,7 +18,7 @@ from bsie.extractor import base
class StubExtractor(base.Extractor):
def __init__(self):
- super().__init__(bsfs.schema.Schema.from_string(base.SCHEMA_PREAMBLE + '''
+ super().__init__(bsfs.schema.from_string(base.SCHEMA_PREAMBLE + '''
bse:author rdfs:subClassOf bsfs:Predicate ;
rdfs:domain bsfs:Entity ;
rdfs:range xsd:string ;
@@ -52,11 +52,11 @@ class TestExtractor(unittest.TestCase):
self.assertNotEqual(hash(ext), hash(sub))
def test_principals(self):
- schema = bsfs.schema.Schema.Empty()
- entity = schema.node(ns.bsfs.Node).get_child(ns.bsfs.Entity)
- 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)
+ schema = bsfs.schema.Schema()
+ entity = schema.node(ns.bsfs.Node).child(ns.bsfs.Entity)
+ string = schema.literal(ns.bsfs.Literal).child(bsfs.URI('http://www.w3.org/2001/XMLSchema#string'))
+ p_author = schema.predicate(ns.bsfs.Predicate).child(ns.bse.author, domain=entity, range=string)
+ p_comment = schema.predicate(ns.bsfs.Predicate).child(ns.bse.comment, domain=entity, range=string)
ext = StubExtractor()
self.assertSetEqual(set(ext.principals),
{p_author, p_comment} | set(schema.predicates()) - {schema.predicate(ns.bsfs.Predicate)})