From 0618dd8478caaa43ad325d0cb7f5b0a7227c0de8 Mon Sep 17 00:00:00 2001 From: davelopez <46503462+davelopez@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:57:55 +0100 Subject: [PATCH] Add test to check quota IDs are encoded correctly --- test/integration/test_quota.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/integration/test_quota.py b/test/integration/test_quota.py index fa9a31919796..24928ef0e007 100644 --- a/test/integration/test_quota.py +++ b/test/integration/test_quota.py @@ -25,6 +25,18 @@ def test_index(self): json_response = index_response.json() assert len(json_response) > 0 + def test_index_returns_encoded_ids(self): + quota = self._create_quota_with_name("test-index-encoded-quota") + created_quota_id = quota["id"] + index_response = self._get("quotas") + index_response.raise_for_status() + json_response = index_response.json() + assert len(json_response) > 0 + quota_ids = [quota["id"] for quota in json_response] + for quota_id in quota_ids: + assert isinstance(quota_id, str) + assert created_quota_id in quota_ids + def test_index_deleted(self): quota = self._create_quota_with_name("test-index-deleted-quota") quota_id = quota["id"]