2011/3/24 LurkingFrog <lurkingf...@gmail.com> > Currently, I am writing unit tests for an application that uses > generic foreign keys. Since the contenttypes are regenerated every > test, I was wondering the most effective way to reconcile the existing > test data with the new contenttypes PKs. > > My current thinking is to make an explicit fixture the dumpdata from > contenttypes at the same time I generate the other fixtures I plan to > use in my tests. From there, I will add code to manually update the > content types in the database to the ones in the aforementioned > contenttypes fixture and call it from the __init__.py in each > application/tests folder. Since that __init__.py should be called > after the migrations are completed, this should make all the data line > up. > > My question is whether this is the most efficient / effective way to > solve this issue. > > Thanks, > Dave
maybe option --natural http://docs.djangoproject.com/en/1.3/ref/django-admin/#dumpdata-appname-appname-appname-model -- Simo - Registered Linux User #395060 - Software is like sex, it is better when it is free --> Linus B. Torvalds -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.