From e3420b15d4a846c34f7f2bb85da8e77a6d06abb4 Mon Sep 17 00:00:00 2001 From: Maxim Zhiltsov Date: Tue, 20 Jun 2023 19:16:00 +0300 Subject: [PATCH] Fix tests --- tests/python/rest_api/test_cloud_storages.py | 2 +- tests/python/rest_api/test_invitations.py | 2 +- tests/python/rest_api/test_organizations.py | 2 +- tests/python/rest_api/test_projects.py | 2 +- tests/python/rest_api/test_tasks.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/python/rest_api/test_cloud_storages.py b/tests/python/rest_api/test_cloud_storages.py index e01ba3bbf11d..8a3d800c9777 100644 --- a/tests/python/rest_api/test_cloud_storages.py +++ b/tests/python/rest_api/test_cloud_storages.py @@ -117,7 +117,7 @@ def test_can_remove_owner_and_fetch_with_sdk(self, admin_user, cloud_storages): # test for API schema regressions source_storage = next( s for s in cloud_storages if s.get("owner") and s["owner"]["username"] != admin_user - ) + ).copy() with make_api_client(admin_user) as api_client: api_client.users_api.destroy(source_storage["owner"]["id"]) diff --git a/tests/python/rest_api/test_invitations.py b/tests/python/rest_api/test_invitations.py index 8137e805c628..3626df9c5d0b 100644 --- a/tests/python/rest_api/test_invitations.py +++ b/tests/python/rest_api/test_invitations.py @@ -151,7 +151,7 @@ def test_can_remove_owner_and_fetch_with_sdk(self, admin_user, invitations): invitations for invitations in invitations if invitations.get("owner") and invitations["owner"]["username"] != admin_user - ) + ).copy() with make_api_client(admin_user) as api_client: api_client.users_api.destroy(source_inv["owner"]["id"]) diff --git a/tests/python/rest_api/test_organizations.py b/tests/python/rest_api/test_organizations.py index 7699e31e340f..460379e2cabf 100644 --- a/tests/python/rest_api/test_organizations.py +++ b/tests/python/rest_api/test_organizations.py @@ -91,7 +91,7 @@ def test_can_remove_owner_and_fetch_with_sdk(self, admin_user, organizations): org for org in organizations if org.get("owner") and org["owner"]["username"] != admin_user - ) + ).copy() with make_api_client(admin_user) as api_client: api_client.users_api.destroy(source_org["owner"]["id"]) diff --git a/tests/python/rest_api/test_projects.py b/tests/python/rest_api/test_projects.py index 960daa0c9986..9b79ca415e60 100644 --- a/tests/python/rest_api/test_projects.py +++ b/tests/python/rest_api/test_projects.py @@ -144,7 +144,7 @@ def test_can_remove_owner_and_fetch_with_sdk(self, admin_user, projects): # test for API schema regressions source_project = next( p for p in projects if p.get("owner") and p["owner"]["username"] != admin_user - ) + ).copy() with make_api_client(admin_user) as api_client: api_client.users_api.destroy(source_project["owner"]["id"]) diff --git a/tests/python/rest_api/test_tasks.py b/tests/python/rest_api/test_tasks.py index 6234d71739a4..e59962608e48 100644 --- a/tests/python/rest_api/test_tasks.py +++ b/tests/python/rest_api/test_tasks.py @@ -206,7 +206,7 @@ def test_can_remove_owner_and_fetch_with_sdk(self, admin_user, tasks): # test for API schema regressions source_task = next( t for t in tasks if t.get("owner") and t["owner"]["username"] != admin_user - ) + ).copy() with make_api_client(admin_user) as api_client: api_client.users_api.destroy(source_task["owner"]["id"])