From acf485b60e8738ab6e88f53d04e2ffdd6912f157 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Thu, 11 Jul 2024 11:19:47 +0200 Subject: [PATCH] Fix test_model One of the other tests were impure, changing backend_fixtures. This commit makes backend_fixtures to return a deep copy of backend_fixtures_json isntead of returning them directly. --- keyFile.json | 1 + python/tests/fixtures/backend_fixtures.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 keyFile.json diff --git a/keyFile.json b/keyFile.json new file mode 100644 index 000000000..573ecbb20 --- /dev/null +++ b/keyFile.json @@ -0,0 +1 @@ +{"type": "service_account", "project_id": "test", "private_key_id": "123456", "private_key": "-----BEGIN PRIVATE KEY-----test-----END PRIVATE KEY-----", "client_email": "test@project.iam.gserviceaccount.com"} \ No newline at end of file diff --git a/python/tests/fixtures/backend_fixtures.py b/python/tests/fixtures/backend_fixtures.py index af2477d49..ceb7f7d36 100644 --- a/python/tests/fixtures/backend_fixtures.py +++ b/python/tests/fixtures/backend_fixtures.py @@ -14,6 +14,7 @@ # limitations under the License. # +import copy import json import os @@ -81,4 +82,4 @@ @pytest.fixture def backend_fixtures(): - return backend_fixtures_json + return copy.deepcopy(backend_fixtures_json)