Commit 78af6f13 authored by Tim Graham's avatar Tim Graham
Browse files

[1.6.x] Added a warning about direct settings manipulation in tests.

Thanks Thomas Chaumeny for the initial patch.

Backport of 3f651b3e from master
parent 4a30e0ae
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1044,6 +1044,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