#9207: Failing test code when using contenttypes app.
--------------------------------------+------------------------------------
     Reporter:  oliverandrich         |                    Owner:  nobody
         Type:  Bug                   |                   Status:  closed
    Component:  contrib.contenttypes  |                  Version:  1.0
     Severity:  Normal                |               Resolution:  fixed
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by nicpottier@…):

 I ran into this as well against Django 1.4.2 and MySQL using InnoDB.  It
 seems very specific to machines.

 I tracked it down a bit and the error for me is the same as in Comment 13,
 it is failing when trying to create the permissions for Auth because the
 content type for User wasn't yet created.  This only occurs when running
 unit tests, and only against InnoDB.

 Changing the order of content_type and auth in INSTALLED_APPS did fix the
 problem.  The error itself does make sense, in that Signals aren't
 guaranteed to happen in order, and both Auth and ContentType are using
 them to do their work after models are synced.  It seems like the
 workaround is not guaranteed to be reliable since there is no contract on
 signal call order.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/9207#comment:15>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to