diff options
author | Matthias Baumgartner <dev@igsor.net> | 2022-12-18 13:37:59 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2022-12-18 13:37:59 +0100 |
commit | 057e09d6537bf5c39815661a75819081e3e5fda7 (patch) | |
tree | 0a59bbfe1c44d3497daad9f25ff9e7eb2bf9eb82 /test | |
parent | 5850ff2bcb1052883cf301590126609b0657fbc9 (diff) | |
download | bsie-057e09d6537bf5c39815661a75819081e3e5fda7.tar.gz bsie-057e09d6537bf5c39815661a75819081e3e5fda7.tar.bz2 bsie-057e09d6537bf5c39815661a75819081e3e5fda7.zip |
adaptions to updates in bsfs
Diffstat (limited to 'test')
-rw-r--r-- | test/apps/test_index.py | 4 | ||||
-rw-r--r-- | test/lib/test_bsie.py | 4 | ||||
-rw-r--r-- | test/tools/test_pipeline.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/test/apps/test_index.py b/test/apps/test_index.py index 2be8470..9cdc656 100644 --- a/test/apps/test_index.py +++ b/test/apps/test_index.py @@ -30,7 +30,7 @@ class TestIndex(unittest.TestCase): ]) prefix = 'http://example.com/me/file#' - self.assertTrue(set(bsfs._Graph__backend.graph).issuperset({ + self.assertTrue(set(bsfs._backend._graph).issuperset({ (rdflib.URIRef(prefix + '2f4109b40107cc50e0884755a1a961ed126887e49b8dbaf0e146b2e226aa6647'), rdflib.RDF.type, rdflib.URIRef(ns.bsfs.File)), (rdflib.URIRef(prefix + '2f4109b40107cc50e0884755a1a961ed126887e49b8dbaf0e146b2e226aa6647'), rdflib.URIRef(ns.bse.author), rdflib.Literal('Me, myself, and I', datatype=rdflib.XSD.string)), (rdflib.URIRef(prefix + '2f4109b40107cc50e0884755a1a961ed126887e49b8dbaf0e146b2e226aa6647'), rdflib.URIRef(ns.bse.filename), rdflib.Literal('alpha_second', datatype=rdflib.XSD.string)), @@ -90,7 +90,7 @@ class TestIndex(unittest.TestCase): # (rdflib.URIRef(prefix + 'd43758ace82154a1cc10ca0dfef63cb20dd831f9c87edd6dc06539eefe67371d'), rdflib.URIRef(ns.bsm.t_created), rdflib.Literal('1670..........', datatype=rdflib.XSD.integer)), # (rdflib.URIRef(prefix + 'd803187cbf3676ae9d38126270a6152c60431589aa3bb3824baf8954e9c097f1'), rdflib.URIRef(ns.bsm.t_created), rdflib.Literal('1670..........', datatype=rdflib.XSD.integer)), # instead, we simply check if there's such a predicate for each file - self.assertSetEqual({sub for sub, _ in bsfs._Graph__backend.graph.subject_objects(rdflib.URIRef(ns.bsm.t_created))}, { + self.assertSetEqual({sub for sub, _ in bsfs._backend._graph.subject_objects(rdflib.URIRef(ns.bsm.t_created))}, { rdflib.URIRef(prefix + '2f4109b40107cc50e0884755a1a961ed126887e49b8dbaf0e146b2e226aa6647'), rdflib.URIRef(prefix + '441f3d10c8ff489fe8e33e639606512f6c463151cc429de7e554b9af670c2ece'), rdflib.URIRef(prefix + '69b98ecf7aff3e95b09688ba93331678eb8397817111f674c9558e6dd8f5e871'), diff --git a/test/lib/test_bsie.py b/test/lib/test_bsie.py index f3f476e..771a0c2 100644 --- a/test/lib/test_bsie.py +++ b/test/lib/test_bsie.py @@ -38,7 +38,7 @@ class TestBSIE(unittest.TestCase): )}, ]) # build pipeline - self.prefix = bsfs.Namespace('http://example.com/local/file#') + self.prefix = bsfs.Namespace('http://example.com/local/') pbuild = builder.PipelineBuilder(self.prefix, rbuild, ebuild) self.pipeline = pbuild.build() @@ -155,7 +155,7 @@ class TestBSIE(unittest.TestCase): ns.bse.author, }) content_hash = 'a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447' - subject = node.Node(ns.bsfs.File, self.prefix + 'file#' + content_hash) + subject = node.Node(ns.bsfs.File, (self.prefix + 'file#')[content_hash]) testfile = os.path.join(os.path.dirname(__file__), 'testfile.t') # from_file extracts all available triples diff --git a/test/tools/test_pipeline.py b/test/tools/test_pipeline.py index 91bf736..a116a30 100644 --- a/test/tools/test_pipeline.py +++ b/test/tools/test_pipeline.py @@ -94,7 +94,7 @@ class TestPipeline(unittest.TestCase): pipeline = Pipeline(self.prefix, self.ext2rdr) # build objects for tests content_hash = 'a948904f2f0f479b8f8197694b30184b0d2ed1c1cd2a1ec0fb85d299a192a447' - subject = node.Node(ns.bsfs.File, self.prefix + 'file#' + content_hash) + subject = node.Node(ns.bsfs.File, (self.prefix + 'file#')[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) |