#21230: Remove usage of direct settings manipulation in Django's tests
------------------------------------------------+------------------------
Reporter: akaariai | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
A number of tests use direct settings manipulation. They should instead
use django.test.utils.override_settings(). Direct manipulation doesn't
send setting_changed signal, and is also error-prone as it is somewhat
easy to miss changing the setting back to its original value.
I am marking this as easy picking. The problematic tests can be found with
`git grep 'settings\.\w* ='` in tests/ directory (another directory is
django/contrib/gis). Pick one file, change instances of
settings.SOME_SETTING = someval to with
override_settings(SOME_SETTING=someval) and reindent as needed. Run tests,
commit, send pull request and repeat for some other file.
--
Ticket URL: <https://code.djangoproject.com/ticket/21230>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.32ff503956f32c887bc0bd86989abf13%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.