diff options
Diffstat (limited to 'test/lib/test_pipeline.py')
-rw-r--r-- | test/lib/test_pipeline.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test/lib/test_pipeline.py b/test/lib/test_pipeline.py index 61fddd7..eb088a9 100644 --- a/test/lib/test_pipeline.py +++ b/test/lib/test_pipeline.py @@ -1,9 +1,4 @@ -""" -Part of the bsie test suite. -A copy of the license is provided with the project. -Author: Matthias Baumgartner, 2022 -""" # standard imports import logging import os @@ -28,19 +23,19 @@ class TestPipeline(unittest.TestCase): # constant A csA = ''' bse:author rdfs:subClassOf bsfs:Predicate ; - rdfs:domain bsfs:File ; + rdfs:domain bsn:Entity ; rdfs:range xsd:string ; bsfs:unique "true"^^xsd:boolean . ''' - tupA = [('http://bsfs.ai/schema/Entity#author', 'Me, myself, and I')] + tupA = [('https://schema.bsfs.io/ie/Node/Entity#author', 'Me, myself, and I')] # constant B csB = ''' bse:rating rdfs:subClassOf bsfs:Predicate ; - rdfs:domain bsfs:File ; + rdfs:domain bsn:Entity ; rdfs:range xsd:integer ; bsfs:unique "true"^^xsd:boolean . ''' - tupB = [('http://bsfs.ai/schema/Entity#rating', 123)] + tupB = [('https://schema.bsfs.io/ie/Node/Entity#rating', 123)] # extractors/readers self.ext2rdr = { bsie.extractor.generic.path.Path(): bsie.reader.path.Path(), @@ -89,13 +84,13 @@ class TestPipeline(unittest.TestCase): pipeline = Pipeline(self.ext2rdr) # build objects for tests content_hash = 'a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447' - subject = node.Node(ns.bsfs.File, ucid=content_hash) + subject = node.Node(ns.bsn.Entity, ucid=content_hash) testfile = os.path.join(os.path.dirname(__file__), 'testfile.t') p_filename = pipeline.schema.predicate(ns.bse.filename) p_filesize = pipeline.schema.predicate(ns.bse.filesize) p_author = pipeline.schema.predicate(ns.bse.author) p_rating = pipeline.schema.predicate(ns.bse.rating) - entity = pipeline.schema.node(ns.bsfs.File) + entity = pipeline.schema.node(ns.bsn.Entity) p_invalid = pipeline.schema.predicate(ns.bsfs.Predicate).child(ns.bse.foo, range=entity) # extract given predicates |