#27127: Overriding timezone in test forces them to be TestCase
-------------------------------+--------------------
     Reporter:  tpazderka      |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Uncategorized  |    Version:  1.10
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 Changing settings of timezone during tests forces them to be `TestCase`
 instead of `SimpleTestCase`. I do believe that this change shouldn't force
 the test to be `TestCase`.
 Testcase:
 {{{
 #!python
 from django.test import SimpleTestCase, override_settings


 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/052.2d14ff395b67587d7cb6971582176d1b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to