Skip to content

Commit 57ba88b

Browse files
committed
fix: getch all roles with page_size 100 in the test
1 parent 926db8e commit 57ba88b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/integration_tests/security/api_tests.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def test_get_roles_with_specific_test_data(self):
371371
Security API: Test roles endpoint with specific test data
372372
"""
373373
self.login(ADMIN_USERNAME)
374-
response = self.client.get(self.show_uri)
374+
response = self.client.get(f"{self.show_uri}?q=(page_size:100)")
375375
self.assert200(response)
376376

377377
data = json.loads(response.data.decode("utf-8"))
@@ -380,7 +380,10 @@ def test_get_roles_with_specific_test_data(self):
380380
api_roles_by_name = {role["name"]: role for role in data["result"]}
381381

382382
# Verify test_role_1
383-
assert "test_role_1" in api_roles_by_name
383+
assert "test_role_1" in api_roles_by_name, (
384+
f"test_role_1 not found in API response. "
385+
f"Available roles: {list(api_roles_by_name.keys())}"
386+
)
384387
role1_api = api_roles_by_name["test_role_1"]
385388
role1_expected = self.test_roles_data["test_role_1"]
386389

@@ -389,7 +392,10 @@ def test_get_roles_with_specific_test_data(self):
389392
assert sorted(role1_api["group_ids"]) == role1_expected["group_ids"]
390393

391394
# Verify test_role_2
392-
assert "test_role_2" in api_roles_by_name
395+
assert "test_role_2" in api_roles_by_name, (
396+
f"test_role_2 not found in API response. "
397+
f"Available roles: {list(api_roles_by_name.keys())}"
398+
)
393399
role2_api = api_roles_by_name["test_role_2"]
394400
role2_expected = self.test_roles_data["test_role_2"]
395401

0 commit comments

Comments
 (0)