@joetsoi I've put this optimization in.

I've already changed things so that only one test module (`action/test_update.py`) actually uses the db, the rest use mocking. With this, your optimization doesn't make much difference (with or without, the tests run in about 30s).

But I tested with two test modules that use the db, and then your optimization takes it from about 55s to under 30s as you said. (And we will end up with multiple test modules using the db as we add more tests.)

But even with your optimization, something is still causing these tests to take 30s when they should run in milliseconds or a couple of seconds at most. I haven't profiled it but I suspect the `model.repo.rebuild_db()`.

So we'll have to optimize further but I think we should do that in a separate pull request.