This is a lot of setup code.  Do all the test methods need all of this?  If not, you should move some of this set up into the start of the `test_*()` method that needs it.