#28400: TransactionTestCase will truncate data created from data migration
-------------------------------------+-------------------------------------
     Reporter:  Jared Mackey         |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Testing framework    |                  Version:  1.11
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  tests,data-          |             Triage Stage:
  migrations                         |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 This is [https://docs.djangoproject.com/en/stable/topics/testing/overview
 /#rollback-emulation as documented]:

  Any initial data loaded in migrations will only be available in
 `TestCase` tests and not in `TransactionTestCase` tests ... Django can
 reload that data for you on a per-testcase basis by setting the
 `serialized_rollback` option to `True` in the body of the `TestCase` or
 `TransactionTestCase`, but note that this will slow down that test suite
 by approximately 3x.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28400#comment:2>
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/068.8537dcf43745512bde51293cd575212d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to