mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 14:38:00 -03:30
[AAP-43413] Removing hardcoded number of flags from feature flag test
Assited-by: Claude
This commit is contained in:
parent
051357e573
commit
43a3a620e3
@ -26,5 +26,10 @@ def test_feature_flags_list_endpoint_override(get, flag_val):
|
||||
seed_feature_flags()
|
||||
url = "/api/v2/feature_flags/states/"
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user