Fixes python tests

pull/171/head
Tpt 4 years ago
parent 4302316a41
commit 1e5847e278
  1. 4
      python/tests/test_model.py
  2. 6
      python/tests/test_store.py

@ -130,7 +130,7 @@ class TestTriple(unittest.TestCase):
NamedNode("http://example.com/o"),
)
),
"<http://example.com/s> <http://example.com/p> <http://example.com/o> .",
"<http://example.com/s> <http://example.com/p> <http://example.com/o>",
)
@ -201,7 +201,7 @@ class TestQuad(unittest.TestCase):
NamedNode("http://example.com/o"),
)
),
"<http://example.com/s> <http://example.com/p> <http://example.com/o> .",
"<http://example.com/s> <http://example.com/p> <http://example.com/o>",
)

@ -172,6 +172,12 @@ class TestStore(unittest.TestCase):
store.update('LOAD <https://www.w3.org/1999/02/22-rdf-syntax-ns>')
self.assertGreater(len(store), 100)
def test_update_star(self):
store = Store()
store.update('PREFIX : <http://www.example.org/> INSERT DATA { :alice :claims << :bob :age 23 >> }')
results = store.query('PREFIX : <http://www.example.org/> SELECT ?p ?a WHERE { ?p :claims << :bob :age ?a >> }')
self.assertEqual(len(list(results)), 1)
def test_load_ntriples_to_default_graph(self):
store = Store()
store.load(

Loading…
Cancel
Save