#23640: StaticLiveServerTestCase does not properly respect data migrations
-------------------------------------+-------------------------------------
     Reporter:  eldamir              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Testing framework    |                  Version:  1.7
     Severity:  Normal               |               Resolution:
     Keywords:  data migration,      |             Triage Stage:  Accepted
  functional tests                   |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by gchp):

 The problem appears to be with
 {{{django.test.testcases.LiveServerTestCase}}} which inherits from
 {{{TransactionTestCase}}}. Changing this class to inherit from
 {{{TestCase}} seems to solve the issue, though I'm not sure if this is
 ideal. The docstring on LiveServerTestCase mentions a reason as to why it
 doesn't inherit from TestCase:


 > Note that it inherits from TransactionTestCase instead of TestCase
 because
 > the threads do not share the same transactions (unless if using in-
 memory
 > sqlite) and each thread needs to commit all their transactions so that
 the
 > other thread can see the changes.


 I'm not sure how true this is, as when changing LiveServerTestCase to
 inherit from TestCase, the issue is fixed and there are no failing tests.
 Not sure whether this means the above statement is no longer true, or
 whether there simply are not enough tests to prove it.

--
Ticket URL: <https://code.djangoproject.com/ticket/23640#comment:3>
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/065.f1ab1f8af325bfd15a0e552fc5121ba9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to