Added a warning about direct settings manipulation in tests.

Thanks Thomas Chaumeny for the initial patch.
This commit is contained in:
Tim Graham 2014-10-31 13:34:41 -04:00
parent 715ccfde24
commit 3f651b3e88
1 changed files with 6 additions and 0 deletions

View File

@ -1061,6 +1061,12 @@ If ``multi_db=True``, fixtures are loaded into all databases.
Overriding settings
~~~~~~~~~~~~~~~~~~~
.. warning::
Use the functions below to temporarily alter the value of settings in tests.
Don't manipulate ``django.conf.settings`` directly as Django won't restore
the original values after such manipulations.
.. method:: SimpleTestCase.settings()
For testing purposes it's often useful to change a setting temporarily and