Currently I have big application with huge amount of initial data.
Basicly, I have postgresql dump file and I should apply some migrations to get “good database”.
And application got almost no fixtures to recreate initial data on sync/migrate.
Yes, this is a big pain in the… head.
Anyway, Django copies database to perform testing and everything should work fine. But the problem is – it takes really long time.
I’m thinking about creating custom test-runner to reproduce these operations, but I want to ask you! What you can suggest?
There are a lot of nice answers on unit-testing with a lot of data
I have these two on my favorites
This one by me Unit Testing with Django Models and a lot of relations involved
and this one by a friend What are the best practices for testing "different layers" in Django?
You could use a library like FactoryBoy to create as many instances of your models as you want, with different characteristics to test several cases. Here is the doc page for FactoryBoy
Edit after chat:
It seems that defining your own test runner is the way to go in this case.
https://docs.djangoproject.com/en/1.2/topics/testing/#defining-a-test-runner