diff --git a/g3w-admin/editing/tests/test_api.py b/g3w-admin/editing/tests/test_api.py index 466e586b4..27e2d5723 100644 --- a/g3w-admin/editing/tests/test_api.py +++ b/g3w-admin/editing/tests/test_api.py @@ -1596,23 +1596,23 @@ def test_editing_commit_mode_api_cascade_relations(self): newid = jresult['response']['new'][0]['id'] newlockid = jresult['response']['new_lockids'][0]['lockid'] - newid_mantaince_work = jresult['response']['new_relations'][maintenance_works_id]['new'][0]['id'] - newlockid_mantaince_work = jresult['response']['new_relations'][maintenance_works_id]['new_lockids'][0]['lockid'] + newid_mantaince_work = jresult['response']['relations'][maintenance_works_id]['new'][0]['id'] + newlockid_mantaince_work = jresult['response']['relations'][maintenance_works_id]['new_lockids'][0]['lockid'] - newid_mantaince_rel1 = jresult['response']['new_relations'][maintenance_rel1_id]['new'][0]['id'] - newlockid_mantaince_rel1 = jresult['response']['new_relations'][maintenance_rel1_id]['new_lockids'][0][ + newid_mantaince_rel1 = jresult['response']['relations'][maintenance_rel1_id]['new'][0]['id'] + newlockid_mantaince_rel1 = jresult['response']['relations'][maintenance_rel1_id]['new_lockids'][0][ 'lockid'] - newid_mantaince_rel2 = jresult['response']['new_relations'][maintenance_rel2_id]['new'][0]['id'] - newlockid_mantaince_rel2 = jresult['response']['new_relations'][maintenance_rel2_id]['new_lockids'][0][ + newid_mantaince_rel2 = jresult['response']['relations'][maintenance_rel2_id]['new'][0]['id'] + newlockid_mantaince_rel2 = jresult['response']['relations'][maintenance_rel2_id]['new_lockids'][0][ 'lockid'] - newid_rating = jresult['response']['new_relations'][buildings_rating_id]['new'][0]['id'] - newlockid_reiting = jresult['response']['new_relations'][buildings_rating_id]['new_lockids'][0][ + newid_rating = jresult['response']['relations'][buildings_rating_id]['new'][0]['id'] + newlockid_reiting = jresult['response']['relations'][buildings_rating_id]['new_lockids'][0][ 'lockid'] - newid_rating_rel1 = jresult['response']['new_relations'][rating_rel1_id]['new'][0]['id'] - newlockid_reiting_rel1 = jresult['response']['new_relations'][rating_rel1_id]['new_lockids'][0][ + newid_rating_rel1 = jresult['response']['relations'][rating_rel1_id]['new'][0]['id'] + newlockid_reiting_rel1 = jresult['response']['relations'][rating_rel1_id]['new_lockids'][0][ 'lockid'] diff --git a/g3w-admin/editing/tests/test_api_transaction_group.py b/g3w-admin/editing/tests/test_api_transaction_group.py index f4a7eacb5..e0ec46762 100644 --- a/g3w-admin/editing/tests/test_api_transaction_group.py +++ b/g3w-admin/editing/tests/test_api_transaction_group.py @@ -511,14 +511,14 @@ def test_add_feature_relations(self): self.assertTrue('properties' in jresult['response']['new'][0]) self.assertEqual(jresult['response']['new'][0]['properties']['name'], "name father") self.assertEqual(jresult['response']['new'][0]['properties']['value'], 4444) - self.assertNotEqual(jresult['response']['new_relations'], {}) + self.assertNotEqual(jresult['response']['relations'], {}) # Verify parent_id_server = jresult['response']['new'][0]['id'] parent_id = get_layer_fids_from_server_fids([parent_id_server], self.poligoni.qgis_layer)[0] self.assertTrue( self.poligoni.qgis_layer.getFeature(parent_id).isValid()) - child_id_server = jresult['response']['new_relations']['test_afb61649_1fb2_426e_b588_04217314f0c4']['new'][0]['id'] + child_id_server = jresult['response']['relations']['test_afb61649_1fb2_426e_b588_04217314f0c4']['new'][0]['id'] child_id = get_layer_fids_from_server_fids([child_id_server], self.test.qgis_layer)[0] self.assertTrue( self.test.qgis_layer.getFeature(child_id).isValid()) @@ -531,7 +531,7 @@ def test_add_feature_relations(self): # There is no cascade here! Delete the child. response = client.post(child_commit_path, { "delete": [child_id_server], - "lockids": jresult['response']['new_relations']['test_afb61649_1fb2_426e_b588_04217314f0c4']['new_lockids'] + "lockids": jresult['response']['relations']['test_afb61649_1fb2_426e_b588_04217314f0c4']['new_lockids'] }, format='json') self.assertTrue(json.loads(response.content)['result'])