class TimezoneTest(SimpleTestCase):
def test_tz(self):
with override_settings(USE_TZ=False):
pass
with override_settings(USE_TZ=True):
pass
}}}
The only query executed during this test is:
{{{
#!sql
SET TIME ZONE 'Europe/Prague'
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27127>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* component: Uncategorized => Testing framework
* needs_tests: => 0
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/27127#comment:1>
* status: new => closed
* resolution: => duplicate
Comment:
Looks like a duplicate of #26712, please reopen with more details if not.
--
Ticket URL: <https://code.djangoproject.com/ticket/27127#comment:2>
Comment (by tpazderka):
Yes, that is indeed the case. Is there a backport planned to 1.10?
--
Ticket URL: <https://code.djangoproject.com/ticket/27127#comment:3>
Comment (by timgraham):
No, I don't think it qualifies per our
[https://docs.djangoproject.com/en/dev/internals/release-process
/#supported-versions supported versions policy].
--
Ticket URL: <https://code.djangoproject.com/ticket/27127#comment:4>
Comment (by tpazderka):
I think that it could be considered as a regression since this test starts
to fail in 1.9, but passes up until then.
--
Ticket URL: <https://code.djangoproject.com/ticket/27127#comment:5>
Comment (by timgraham):
You can use
[https://docs.djangoproject.com/en/stable/topics/testing/tools/#django.test.SimpleTestCase.allow_database_queries
SimpleTestCase.allow_database_queries].
--
Ticket URL: <https://code.djangoproject.com/ticket/27127#comment:6>
Comment (by tpazderka):
Replying to [comment:6 timgraham]:
> You can use
[https://docs.djangoproject.com/en/stable/topics/testing/tools/#django.test.SimpleTestCase.allow_database_queries
SimpleTestCase.allow_database_queries].
Yes, I know. We were hoping to avoid that. Thanks for the consideration.
--
Ticket URL: <https://code.djangoproject.com/ticket/27127#comment:7>