Skip to content

Commit 9d38d09

Browse files
authored
[AAP-46508] rename feature_flag_state view for uniform reverse lookup (#741)
## Description <!-- Mandatory: Provide a clear, concise description of the changes and their purpose --> - What is being changed? This change is part of the work in [AAP-46508](https://issues.redhat.com/browse/AAP-46508) django view name for endpoint `'feature_flags_state/'` is renamed from `featureflags-list` to `feature-flags-state-list`. - Why is this change needed? This will make the view name standard-conforming and simplify the logic in reverse URL look up ## Type of Change <!-- Mandatory: Check one or more boxes that apply --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update - [x] Test update - [ ] Refactoring (no functional changes) - [ ] Development environment change - [x] Configuration change ## Self-Review Checklist <!-- These items help ensure quality - they complement our automated CI checks --> - [x] I have performed a self-review of my code - [x] I have added relevant comments to complex code sections - [x] I have updated documentation where needed - [x] I have considered the security impact of these changes - [x] I have considered performance implications - [x] I have thought about error handling and edge cases - [x] I have tested the changes in my local environment ## Testing Instructions ### Steps to Test 1. all tests in `test_app/tests/feature_flags/test_api.py` should pass 2. 3.
1 parent 7750ef4 commit 9d38d09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ansible_base/feature_flags/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
app_name = FeatureFlagsConfig.label
77

88
api_version_urls = [
9-
path('feature_flags_state/', views.FeatureFlagsStateListView.as_view(), name='featureflags-list'),
9+
path('feature_flags_state/', views.FeatureFlagsStateListView.as_view(), name='feature-flags-state-list'),
1010
]
1111
api_urls = []
1212
root_urls = []

test_app/tests/feature_flags/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_feature_flags_state_api_list(admin_api_client: APIClient):
88
"""
99
Test that we can list all feature flags
1010
"""
11-
url = get_relative_url("featureflags-list")
11+
url = get_relative_url("feature-flags-state-list")
1212
response = admin_api_client.get(url)
1313
assert response.status_code == 200
1414
assert 'FEATURE_SOME_PLATFORM_FLAG_ENABLED' in response.data
@@ -34,7 +34,7 @@ def test_feature_flags_state_api_list_settings_override(admin_api_client: APICli
3434
"""
3535
Test that we can list all feature flags
3636
"""
37-
url = get_relative_url("featureflags-list")
37+
url = get_relative_url("feature-flags-state-list")
3838
response = admin_api_client.get(url)
3939
assert response.status_code == 200
4040
assert 'FEATURE_SOME_PLATFORM_FLAG_ENABLED' not in response.data
@@ -51,7 +51,7 @@ def test_feature_flags_state_api_list_settings_override_empty(admin_api_client:
5151
"""
5252
Test that we can list all feature flags
5353
"""
54-
url = get_relative_url("featureflags-list")
54+
url = get_relative_url("feature-flags-state-list")
5555
response = admin_api_client.get(url)
5656
assert response.status_code == 200
5757
assert response.data == {}

0 commit comments

Comments
 (0)