SEP-1885: Migrate the test suite off SettingClassEnum members as setting_class values so the column can be a plain string - #1430
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The migration is consistent with the storage and API contracts; only minor docstring updates remain.
Pull request overview
This test-only PR consistently separates database storage tokens from proxy/API class-name identifiers.
Changes:
- Replaces enum-backed database values and filters with derived storage tokens.
- Uses settings-class
__name__values for proxy/API identifiers. - Centralizes common test tokens in shared configuration.
File summaries
| File | Description |
|---|---|
tests/app/tasks/test_settings_override_integration.py |
Uses the Tasks storage token. |
tests/app/tasks/test_celery_settings_override.py |
Updates Tasks and Anonymizer row seeding. |
tests/app/tasks/settings/test_routes.py |
Filters persisted rows by storage token. |
tests/app/sep/test_settings_override_worker.py |
Derives tokens from settings classes. |
tests/app/sep/test_settings_override_integration.py |
Updates SEP and Snippets rows. |
tests/app/sep/test_proxy_routes_with_override.py |
Derives proxy-route test tokens. |
tests/app/sep/apps/atw/test_send.py |
Uses the SEP storage token. |
tests/app/sep/api/routes/test_settings.py |
Updates settings API row filters. |
tests/app/inventory/test_settings_routes.py |
Uses the Inventory storage token. |
tests/app/core/settings_override/test_worker.py |
Uses class names for proxies. |
tests/app/core/settings_override/test_registry.py |
Updates registry row identifiers. |
tests/app/core/settings_override/test_registry_nested.py |
Uses class names in nested helpers. |
tests/app/core/settings_override/test_policy_gates.py |
Updates policy test row tokens. |
tests/app/core/settings_override/test_manager.py |
Exercises plain-string manager values. |
tests/app/core/settings_override/test_lifecycle.py |
Separates proxy names from row tokens. |
tests/app/core/settings_override/test_cache.py |
Updates snapshot fixture tokens. |
tests/app/core/settings_override/conftest.py |
Defines shared derived tokens. |
tests/app/core/settings_override/api/test_registry_helpers.py |
Uses class-name API identifiers. |
tests/app/core/settings_override/api/test_policy_lockdown.py |
Updates lockdown row tokens. |
Review details
- Files reviewed: 19/19 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
Author
|
@copilot, please resolve your comments |
Contributor
Author
|
======================= 585 passed, 46 warnings in 8.44s ======================= |
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||
yyyyyyyan
approved these changes
Sep 2, 2026
peter-o-addo
enabled auto-merge (squash)
September 3, 2026 15:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate settings-override tests off
SettingClassEnumforSettingOverride.setting_class, usingsetting_class_token()(and shared conftest constants) for DB rows andSettingsCls.__name__for proxy/APIsetting_classargs.tests/app/core/settings_override/conftest.py: add shared*_SETTINGS_TOKEN/SETTINGS_TOKENconstants viasetting_class_token()tests/app/core/settings_override/test_{cache,manager,lifecycle,policy_gates,registry}.py,api/test_policy_lockdown.py: write/filter override rows with those tokens instead ofSettingClassEnumtests/app/core/settings_override/test_{lifecycle,worker,registry_nested}.py,api/test_registry_helpers.py: passXxxSettings.__name__toOverridableSettingsProxy/_settings_response_from_fieldtests/app/sep/test_settings_override_{integration,worker}.py,api/routes/test_settings.py,apps/atw/test_send.py,test_proxy_routes_with_override.py: same token/__name__migration (helpers typed on settings class where used)tests/app/tasks/test_{celery_settings_override,settings_override_integration}.py,settings/test_routes.py,tests/app/inventory/test_settings_routes.py: same for Tasks/Inventory override fixtures and filtersapp/changes; existing suites still pass with no assertion rewrites beyond the token/__name__swapTested
Checklist
make test)make run-pre-commit)make makemigrations)changelog.d/if the change is user-facing (make changelog-add), or confirmed N/A (internal-only change, or a same-release-cycle fix for an unreleased sibling ticket)