Skip to content

Commit

Permalink
[1.6.x] Fixed #22071 -- Added a warning regarding override_settings a…
Browse files Browse the repository at this point in the history
…nd aliasing.

Thanks EvilDMP for the suggestion.

Backport of e65c0cc from master
  • Loading branch information
henkvos authored and timgraham committed Feb 25, 2014
1 parent 3a5da7a commit 985d086
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/topics/testing/tools.txt
Expand Up @@ -1104,6 +1104,10 @@ The decorator can also be applied to test case classes::
the original ``LoginTestCase`` is still equally affected by the
decorator.

Finally, avoid aliasing your settings as module-level constants as
``override_settings()`` won't work on such values since they are
only evaluated the first time the module is imported.

You can also simulate the absence of a setting by deleting it after settings
have been overriden, like this::

Expand Down

0 comments on commit 985d086

Please sign in to comment.