mirror of
https://github.com/django/django.git
synced 2025-07-22 20:55:17 +00:00
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:
parent
3e8b40f479
commit
a15cfb2e45
3 changed files with 39 additions and 45 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue