#8792: Django's unit test system wipes out "custom sql" data before performing
tests
---------------------------------------+------------------------------------
Reporter: deltoide | Owner: nobody
Status: new | Milestone: post-1.0
Component: Unit test system | Version: SVN
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------+------------------------------------
Comment (by russellm):
Ah - #7052 rises again. For future reference - another way to solve this
problem (rather than using raw SQL) is to use a post_syncdb trigger. You
can register a python method that listens for the post_syncdb signal, and
as a result it will get executed as part of a flush. This is what
django.contrib.contenttypes does to set up the content types in the first
place. If your application as a management.py module that registers a
signal handler in a similar way, you can get fixtures without needing raw
SQL, and in a way that is compatible with the test framework.
--
Ticket URL: <http://code.djangoproject.com/ticket/8792#comment:3>
Django Code <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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---