Commit 9945300
refactor: migrate ENTERPRISE_ENABLED off FEATURES-as-dict
The learner_home view tests carried seven
`@patch.dict(settings.FEATURES, ENTERPRISE_ENABLED=False)` decorators.
Note this is the kwarg form, so it set a FEATURES key literally named
'ENTERPRISE_ENABLED' — which nothing in the codebase reads (the enterprise
dashboard is gated by ENABLE_ENTERPRISE_INTEGRATION). The nearby module
constant `ENTERPRISE_ENABLED = "ENABLE_ENTERPRISE_INTEGRATION"` was never
referenced by these kwargs, so the override has always been a no-op; it
looks like the author intended to disable ENABLE_ENTERPRISE_INTEGRATION.
This change is scoped to getting off the FEATURES dict, not fixing the
latent no-op: convert the decorators to the equivalent
`@override_settings(ENTERPRISE_ENABLED=False)` (behavior identical — still
sets an unread flat attribute) and drop the now-dead, misleading constant.
A follow-up could decide whether these tests meant to assert the
enterprise-disabled path via ENABLE_ENTERPRISE_INTEGRATION.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent fb5d598 commit 9945300
1 file changed
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
| |||
573 | 571 | | |
574 | 572 | | |
575 | 573 | | |
576 | | - | |
| 574 | + | |
577 | 575 | | |
578 | 576 | | |
579 | 577 | | |
| |||
600 | 598 | | |
601 | 599 | | |
602 | 600 | | |
603 | | - | |
| 601 | + | |
604 | 602 | | |
605 | 603 | | |
606 | 604 | | |
| |||
629 | 627 | | |
630 | 628 | | |
631 | 629 | | |
632 | | - | |
| 630 | + | |
633 | 631 | | |
634 | 632 | | |
635 | 633 | | |
| |||
658 | 656 | | |
659 | 657 | | |
660 | 658 | | |
661 | | - | |
| 659 | + | |
662 | 660 | | |
663 | 661 | | |
664 | 662 | | |
| |||
699 | 697 | | |
700 | 698 | | |
701 | 699 | | |
702 | | - | |
| 700 | + | |
703 | 701 | | |
704 | 702 | | |
705 | 703 | | |
| |||
735 | 733 | | |
736 | 734 | | |
737 | 735 | | |
738 | | - | |
| 736 | + | |
739 | 737 | | |
740 | 738 | | |
741 | 739 | | |
| |||
758 | 756 | | |
759 | 757 | | |
760 | 758 | | |
761 | | - | |
| 759 | + | |
762 | 760 | | |
763 | 761 | | |
764 | 762 | | |
| |||
0 commit comments