From f2733f409de1df6c5e220e9424f27f0219365c12 Mon Sep 17 00:00:00 2001 From: arcangelo7 Date: Tue, 17 Sep 2024 16:31:36 +0200 Subject: [PATCH] tests bugfix --- test/provenance_test.py | 4 ++-- test/storer_test.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/provenance_test.py b/test/provenance_test.py index c83b326..9674217 100644 --- a/test/provenance_test.py +++ b/test/provenance_test.py @@ -44,7 +44,7 @@ def test_add_se(self): def test_generate_provenance(self): cur_time = 1607375859.846196 - cur_time_str = '2020-12-07T21:17:39+00:00' + cur_time_str = '2020-12-07T21:17:34+00:00' with self.subTest('Creation -> No snapshot -> Modification. OCDMGraph. in-memory counter'): ocdm_graph = OCDMGraph() ocdm_graph.parse(os.path.join('test', 'br.nt')) @@ -124,7 +124,7 @@ def test_generate_provenance_after_merge(self): se_id_0636064270_1 = ocdm_conjunctive_graph.get_entity(f'https://w3id.org/oc/meta/id/0636064270/prov/se/1') se_id_0636064270_2 = ocdm_conjunctive_graph.get_entity(f'https://w3id.org/oc/meta/id/0636064270/prov/se/2') self.assertEqual(se_id_0636064270_1.get_description(), "The entity 'https://w3id.org/oc/meta/id/0636064270' has been created.") - self.assertEqual(se_id_0636064270_2.get_description(), "The entity 'https://w3id.org/oc/meta/id/0636064270' was modified.") + self.assertEqual(se_id_0636064270_2.get_description(), "The entity 'https://w3id.org/oc/meta/id/0636064270' has been deleted.") self.assertEqual(se_id_0636064270_2.get_update_action(), "DELETE DATA { GRAPH { . } }") if __name__ == '__main__': diff --git a/test/storer_test.py b/test/storer_test.py index 7c58b41..8231160 100644 --- a/test/storer_test.py +++ b/test/storer_test.py @@ -99,8 +99,8 @@ def test_upload_all_provenance(self): results = {(result['g']['value'], result['s']['value'], result['p']['value'], result['o']['value']) for result in results['results']['bindings']} expected_result = { ('https://w3id.org/oc/meta/br/0605/prov/', 'https://w3id.org/oc/meta/br/0605/prov/se/2', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'http://www.w3.org/ns/prov#Entity'), - ('https://w3id.org/oc/meta/br/0636066666/prov/', 'https://w3id.org/oc/meta/br/0636066666/prov/se/1', 'http://www.w3.org/ns/prov#generatedAtTime', '2020-12-07T21:17:39.000Z'), - ('https://w3id.org/oc/meta/br/0605/prov/', 'https://w3id.org/oc/meta/br/0605/prov/se/1', 'http://www.w3.org/ns/prov#generatedAtTime', '2020-12-07T21:17:39.000Z'), + ('https://w3id.org/oc/meta/br/0636066666/prov/', 'https://w3id.org/oc/meta/br/0636066666/prov/se/1', 'http://www.w3.org/ns/prov#generatedAtTime', '2020-12-07T21:17:34.000Z'), + ('https://w3id.org/oc/meta/br/0605/prov/', 'https://w3id.org/oc/meta/br/0605/prov/se/1', 'http://www.w3.org/ns/prov#generatedAtTime', '2020-12-07T21:17:34.000Z'), ('https://w3id.org/oc/meta/br/0605/prov/', 'https://w3id.org/oc/meta/br/0605/prov/se/1', 'http://www.w3.org/ns/prov#invalidatedAtTime', '2020-12-07T21:17:39.000Z'), ('https://w3id.org/oc/meta/br/0636066666/prov/', 'https://w3id.org/oc/meta/br/0636066666/prov/se/1', 'http://www.w3.org/ns/prov#specializationOf', 'https://w3id.org/oc/meta/br/0636066666'), ('https://w3id.org/oc/meta/br/0605/prov/', 'https://w3id.org/oc/meta/br/0605/prov/se/2', 'https://w3id.org/oc/ontology/hasUpdateQuery', 'DELETE DATA { "A Review Of Hemolytic Uremic Syndrome In Patients Treated With Gemcitabine Therapy" . }; INSERT DATA { "Bella zì" . }'),