I want a utility to:
- load up a database with a complete dump (several megabytes)
- execute some Django code and measurements on that database
- have the database go away
- use a command-line tool with arguments to control the behavior of this utility
This is very much like a Django unit test, but where the results are not pass-fail. Rather, there is just some computation run on an ephemeral database.
Also, I will use lots of different data dumps, so using fixtures is not a practical way to load data. (I can load using other utilities, but not using Django unit testing facilities. I've solved this issue.)
What's the easiest way to do the bullet points above?
Should I write a program that is a Django unit test, but somehow is not executed with my normal unit tests? Some other option?
This question is slightly related, in that it describes how to pass command-line arguments to a Django unit test. Looks awkward, but maybe that's the way?