Commit 65c8cdf
fix: skip third_party_auth settings tests under CMS and guard enterprise pipeline
The settings tests were failing when run with CMS settings because the
third_party_auth settings (SOCIAL_AUTH_PIPELINE, ExceptionMiddleware,
etc.) are now defined only in lms/envs/common.py.
Investigation confirmed CMS does not need these settings:
- CMS has no social auth URL endpoints (third_party_auth URLs only
included in LMS when ENABLE_THIRD_PARTY_AUTH is true)
- CMS uses EdxDjangoStrategy for OAuth2 SSO with LMS, not
ConfigurationModelStrategy for third-party identity providers
- CMS authentication backends are EdXOAuth2 (LMS SSO) and
LtiAuthenticationBackend, not social auth backends
- The third_party_auth app is only in cms/envs/test.py INSTALLED_APPS
to avoid import errors from indirect dependencies (like enterprise)
Changes:
- Added @skip_unless_lms decorator to SettingsUnitTest class
- Added hasattr guard for SOCIAL_AUTH_PIPELINE in apps.py to prevent
AttributeError when running under CMS (which doesn't have this setting)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 345348d commit 65c8cdf
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
0 commit comments