diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-11-21 13:35:59 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-11-21 13:56:40 +0100 |
commit | cc64e5afa5606b29df76ca51b359ed343e53d7de (patch) | |
tree | 1c3e8460a0f58d100d2a9a2b1aad12dde0a37ea0 | |
parent | 108d94e2d1261d59cb414dc95a8d669bd5b22580 (diff) | |
download | tracker-cc64e5afa5606b29df76ca51b359ed343e53d7de.tar.gz |
tests: Make ontology-rollback functional test use absolute IRIs
Do not rely on our loose interpretation of IRIs to make tests work.
-rw-r--r-- | tests/functional-tests/ontology-rollback.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/functional-tests/ontology-rollback.py b/tests/functional-tests/ontology-rollback.py index cb3e8307d..51fda54aa 100644 --- a/tests/functional-tests/ontology-rollback.py +++ b/tests/functional-tests/ontology-rollback.py @@ -265,31 +265,31 @@ class SimpleOntologyRollback (OntologyRollbackTestTemplate): # test:a_tmp_prop only appeared in the malformed ontology with self.assertRaises(GLib.GError): self.tracker.update( - "INSERT { <t1.1> a test:A ; test:a_tmp_prop 5. }") + "INSERT { <http://example/t1.1> a test:A ; test:a_tmp_prop 5. }") # The domain of test:b_a_domain should be test:A no test:B with self.assertRaises(GLib.GError): self.tracker.update( - "INSERT { <t1.2> a test:B ; test:b_a_domain 5. }") + "INSERT { <http://example/t1.2> a test:B ; test:b_a_domain 5. }") # The domain should be test:B and range be test:A with self.assertRaises(GLib.GError): self.tracker.update( - "INSERT { <t1.3> a test:B . <t1.4> a test:A ; test:a_b_domain_range <t1.3>. }") + "INSERT { <http://example/t1.3> a test:B . <t1.4> a test:A ; test:a_b_domain_range <http://example/t1.3>. }") # test2:C should be subclass of test:B not test:A with self.assertRaises(GLib.GError): self.tracker.update( - "INSERT { <t1.5> a test2:C ; test:b_a_domain 5. }") + "INSERT { <http://example/t1.5> a test2:C ; test:b_a_domain 5. }") self.tracker.update( - "INSERT { <t1.6> a test:A ; test:b_a_domain 5. }") + "INSERT { <http://example/t1.6> a test:A ; test:b_a_domain 5. }") self.tracker.update( - "INSERT { <t1.7> a test:B ; test:a_b_domain_range <t1.6>. }") + "INSERT { <http://example/t1.7> a test:B ; test:a_b_domain_range <http://example/t1.6>. }") self.tracker.update( - "INSERT { <t1.8> a test2:C ; test:b_range_boolean_string \"String\". }") + "INSERT { <http://example/t1.8> a test2:C ; test:b_range_boolean_string \"String\". }") def validate_first_ontology_status(self): result = self.tracker.query( @@ -309,10 +309,10 @@ class SimpleOntologyRollback (OntologyRollbackTestTemplate): # and became test:A in the error-free ontology with self.assertRaises(GLib.GError): self.tracker.update( - "INSERT { <t2.1> a test:B ; test:a_b_domain 5. }") + "INSERT { <http://example/t2.1> a test:B ; test:a_b_domain 5. }") self.tracker.update( - "INSERT { <t2.2> a test:A ; test:a_b_domain 5. }") + "INSERT { <http://example/t2.2> a test:A ; test:a_b_domain 5. }") def validate_second_ontology_status(self): result = self.tracker.query( @@ -321,7 +321,7 @@ class SimpleOntologyRollback (OntologyRollbackTestTemplate): self.assertEqual(result[0][1], XSD_INTEGER) result = self.tracker.query( - "SELECT ?v WHERE { <t2.2> test:a_b_domain ?v }") + "SELECT ?v WHERE { <http://example/t2.2> test:a_b_domain ?v }") self.assertEqual(result[0][0], "5") if __name__ == "__main__": |