From 6b3e32b29799a8143e8ce9d20c5f27e3e166b9bb Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Thu, 12 Jan 2023 10:17:07 +0100 Subject: changed path to from_string in clients --- test/graph/ac/test_null.py | 4 ++-- test/graph/test_graph.py | 12 ++++++------ test/graph/test_nodes.py | 2 +- test/graph/test_resolve.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'test/graph') diff --git a/test/graph/ac/test_null.py b/test/graph/ac/test_null.py index c863943..c3df393 100644 --- a/test/graph/ac/test_null.py +++ b/test/graph/ac/test_null.py @@ -8,7 +8,7 @@ Author: Matthias Baumgartner, 2022 import unittest # bsie imports -from bsfs import schema as _schema +from bsfs import schema as bsc from bsfs.namespace import ns from bsfs.query import ast from bsfs.triple_store import SparqlStore @@ -23,7 +23,7 @@ from bsfs.graph.ac.null import NullAC class TestNullAC(unittest.TestCase): def setUp(self): self.backend = SparqlStore() - self.backend.schema = _schema.Schema.from_string(''' + self.backend.schema = bsc.from_string(''' prefix rdfs: prefix xsd: diff --git a/test/graph/test_graph.py b/test/graph/test_graph.py index 8503d5b..125084c 100644 --- a/test/graph/test_graph.py +++ b/test/graph/test_graph.py @@ -25,7 +25,7 @@ class TestGraph(unittest.TestCase): def setUp(self): self.user = URI('http://example.com/me') self.backend = SparqlStore.Open() - self.backend.schema = schema.Schema.from_string(''' + self.backend.schema = schema.from_string(''' prefix rdfs: prefix bsfs: bsfs:Entity rdfs:subClassOf bsfs:Node . @@ -118,7 +118,7 @@ class TestGraph(unittest.TestCase): schema.Node(ns.bsfs.Node, None)))}), append=False) # can migrate to compatible schema - target_1 = schema.Schema.from_string(''' + target_1 = schema.from_string(''' prefix rdfs: prefix xsd: prefix bsfs: @@ -142,7 +142,7 @@ class TestGraph(unittest.TestCase): # new schema is applied self.assertLess(target_1, graph.schema) # graph appends its predicates - self.assertEqual(graph.schema, target_1 + schema.Schema.from_string(''' + self.assertEqual(graph.schema, target_1 + schema.from_string(''' prefix rdfs: prefix xsd: prefix bsfs: @@ -155,7 +155,7 @@ class TestGraph(unittest.TestCase): ''')) # can overwrite the current schema - target_2 = schema.Schema.from_string(''' + target_2 = schema.from_string(''' prefix rdfs: prefix xsd: prefix bsfs: @@ -181,7 +181,7 @@ class TestGraph(unittest.TestCase): # new schema is applied self.assertLess(target_2, graph.schema) # graph appends its predicates - self.assertEqual(graph.schema, target_2 + schema.Schema.from_string(''' + self.assertEqual(graph.schema, target_2 + schema.from_string(''' prefix rdfs: prefix xsd: prefix bsfs: @@ -196,7 +196,7 @@ class TestGraph(unittest.TestCase): def test_get(self): # setup graph = Graph(self.backend, self.user) - graph.migrate(schema.Schema.from_string(''' + graph.migrate(schema.from_string(''' prefix rdfs: prefix xsd: prefix bsfs: diff --git a/test/graph/test_nodes.py b/test/graph/test_nodes.py index 11ae46d..47647bd 100644 --- a/test/graph/test_nodes.py +++ b/test/graph/test_nodes.py @@ -24,7 +24,7 @@ class TestNodes(unittest.TestCase): def setUp(self): # initialize backend self.backend = SparqlStore() - self.backend.schema = _schema.Schema.from_string(''' + self.backend.schema = _schema.from_string(''' prefix rdfs: prefix xsd: diff --git a/test/graph/test_resolve.py b/test/graph/test_resolve.py index f515320..a27e8c9 100644 --- a/test/graph/test_resolve.py +++ b/test/graph/test_resolve.py @@ -31,7 +31,7 @@ class TestFilter(unittest.TestCase): """ def test_call(self): - schema = bsc.Schema.from_string(''' + schema = bsc.from_string(''' prefix rdfs: prefix xsd: -- cgit v1.2.3