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

-- 
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.

Reply via email to