Ticket #17787: 17787-docs.diff

File 17787-docs.diff, 1.7 KB (added by Claude Paroz, 12 years ago)

Update override_settings docs

  • docs/topics/testing.txt

    diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
    index c4c7373..0287114 100644
    a b The decorator can also be applied to test case classes::  
    15591559    the original ``LoginTestCase`` is still equally affected by the
    15601560    decorator.
    15611561
    1562 .. note::
    1563 
    1564     When overriding settings, make sure to handle the cases in which your app's
    1565     code uses a cache or similar feature that retains state even if the
    1566     setting is changed. Django provides the
    1567     :data:`django.test.signals.setting_changed` signal that lets you register
    1568     callbacks to clean up and otherwise reset state when settings are changed.
    1569     Note that this signal isn't currently used by Django itself, so changing
    1570     built-in settings may not yield the results you expect.
     1562When overriding settings, make sure to handle the cases in which your app's
     1563code uses a cache or similar feature that retains state even if the
     1564setting is changed. Django provides the
     1565:data:`django.test.signals.setting_changed` signal that lets you register
     1566callbacks to clean up and otherwise reset state when settings are changed.
     1567
     1568Django itself uses this signal to reset various data:
     1569
     1570=========================== ========================
     1571Overriden settings          Data reset
     1572=========================== ========================
     1573USE_TZ, TIME_ZONE           Databases timezone
     1574TEMPLATE_CONTEXT_PROCESSORS Context processors cache
     1575SERIALIZATION_MODULES       Serializers cache
     1576LOCALE_PATHS, LANGUAGE_CODE Default translation and loaded translations
     1577=========================== ========================
    15711578
    15721579Emptying the test outbox
    15731580~~~~~~~~~~~~~~~~~~~~~~~~
Back to Top