refactor: migrate 10 more flags off FEATURES-as-dict (batch 6)#38903
refactor: migrate 10 more flags off FEATURES-as-dict (batch 6)#38903feanil wants to merge 10 commits into
Conversation
7f7db06 to
70ae384
Compare
|
|
||
| # Lots of patching to stub in our own settings, and HTTP posting | ||
| @patch.dict(settings.VERIFY_STUDENT, FAKE_SETTINGS) | ||
| @patch.dict(settings.FEATURES, {'AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING': True}) |
There was a problem hiding this comment.
The goal of this test was to verify that when the management command runs, a signal is fired for re-running idv. The AUTOMATIC_VERIFY_STUDENT_IDENTITY_FOR_TESTING decides whether or not the test call to the IDV system are successful. This determines the responses we get back but is not actually relevant to the part of the system we're trying to test.
This is removed because this patch doesn't actually wrap the setup function which is where the creation happens and the value of this flag is checked. Luckily the test is written as if it should be false and so the test checks work as if this setting was never here.
We drop this patch because it is confusing and ineffective rather than converting it which would break the test and cause it to be re-written but not really changing the part of the code meant to be exercised.
70ae384 to
a0d39d0
Compare
a0d39d0 to
5aed00f
Compare
Summary
Migrates 10 more feature flags off
settings.FEATURES['X']dict-style access onto flat settings (settings.X) with@override_settings(X=Y)in tests. Follows the pattern established in #38772.Each commit migrates a single flag:
openedx/envs/common.py)