mirror of
https://github.com/ansible/awx.git
synced 2026-05-11 19:37:38 -02:30
[AAP-43413] Removing hardcoded number of flags from feature flag test
Assited-by: Claude
This commit is contained in:
@@ -26,5 +26,10 @@ def test_feature_flags_list_endpoint_override(get, flag_val):
|
|||||||
seed_feature_flags()
|
seed_feature_flags()
|
||||||
url = "/api/v2/feature_flags/states/"
|
url = "/api/v2/feature_flags/states/"
|
||||||
response = get(url, user=bob, expect=200)
|
response = get(url, user=bob, expect=200)
|
||||||
assert len(response.data["results"]) == 5
|
|
||||||
|
results = response.data["results"]
|
||||||
|
flag_names = [flag["name"] for flag in results]
|
||||||
|
|
||||||
|
assert flag_name in flag_names, f"{flag_name} should be present in feature flags"
|
||||||
|
assert all(name.startswith("FEATURE_") for name in flag_names), "All feature flags should start with FEATURE_ prefix"
|
||||||
assert flag_state(flag_name) == flag_val
|
assert flag_state(flag_name) == flag_val
|
||||||
|
|||||||
Reference in New Issue
Block a user