Simplified timezones tests with settings_changed.

All relevant state is now properly reset whenever TIME_ZONE or USE_TZ
are changed in tests.
This commit is contained in:
Aymeric Augustin 2012-04-29 16:03:46 +02:00
parent 3e8b40f479
commit a15cfb2e45
3 changed files with 39 additions and 45 deletions

View file

@ -95,7 +95,6 @@ utc = pytz.utc if pytz else UTC()
# In order to avoid accessing the settings at compile time,
# wrap the expression in a function and cache the result.
# If you change settings.TIME_ZONE in tests, reset _localtime to None.
_localtime = None
def get_default_timezone():