Skip to content

Commit

Permalink
Add testing for 'update' section
Browse files Browse the repository at this point in the history
  • Loading branch information
wlorenzetti committed Dec 13, 2024
1 parent a4ab243 commit 8264322
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions g3w-admin/editing/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,17 @@ def test_editing_commit_mode_api_cascade_relations(self):
response = self.client.post(commit_path, payload, format='json')
self.assertEqual(response.status_code, 200)

jresult = json.loads(response.content)

self.assertTrue('update' in jresult['response'])
self.assertEqual(jresult['response']['update'][0]['id'], str(newid))
self.assertTrue('update' in jresult['response']['relations'][maintenance_works_id])
self.assertEqual(jresult['response']['relations'][maintenance_works_id]['update'][0]['id'],
str(newid_mantaince_work))
self.assertEqual(jresult['response']['relations'][maintenance_rel1_id]['update'][0]['id'],
str(newid_mantaince_rel1))


# Check for mantaince rel1 layer: manitenance_rel1_3ce8bd5c_c62d_45bc_8f81_b301e6592128
data_path = reverse('core-vector-api',
args=['data', 'qdjango', self.editing_cascade_relations_project.instance.pk,
Expand Down

0 comments on commit 8264322

Please sign in to comment.