I need to run module migrations when testing, and the particular modules are not necessarily known in advance (different instances of my app might have different modules but I'd like to run the same set of tests on them). This is easy to do from the command line, but I can't figure out how to do it programatically from within a test. I've put the full details as a question on Stack Overflow - would very much appreciate it if anyone here can help: