This looks like you should have in a test_init function. Not crucial now, because there are only two, but just a thought to keep in mind. (The shutdown process would also be in a test clean up func)