#9207: Failing test code when using contenttypes app.
------------------------------------+---------------------------------------
          Reporter:  oliverandrich  |         Owner:  nobody
            Status:  new            |     Milestone:        
         Component:  Contrib apps   |       Version:  1.0   
        Resolution:                 |      Keywords:        
             Stage:  Accepted       |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Comment (by aball):

 It turns out that what I was seeing seemed to be due to my running {{{
 python manage.py sqlflush | python manage.py dbshell }}} instead of {{{
 python manage.py flush --noinput --verbosity=0 }}} in unittests that I run
 via RPC to a running Django instance (not run by {{{ python manage.py test
 }}}).  Using {{{ sqlflush }}} instead of {{{ flush }}} probably caused the
 post_syncdb hook for the contenttypes app to not get invoked, caching the
 contenttype cache to not be cleared.  Things work fine if I use the {{{
 flush }}} command instead.

 Replying to [comment:6 aball]:
 > I'm seeing this also with MySQL and two custom apps installed with only
 the contenttypes app.
 >
 > Replying to [comment:5 mattgrayson]:
 > > I'm getting the same kind of error, but not involving the auth module.
 Workaround does not work for me.
 > >
 > > Tried stripping down the installed apps to just contenttypes and the
 single app using contenttypes.
 > >
 > > When tests run I get errors like:
 > >
 > > {{{
 > > IntegrityError: (1452, 'Cannot add or update a child row: a foreign
 key constraint fails (`test_libsite/ems_link`,
 > > CONSTRAINT `content_type_id_refs_id_47084aec` FOREIGN KEY
 (`content_type_id`) REFERENCES `django_content_type` (`id`))')
 > > }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9207#comment:7>
Django <http://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 django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to