This is necessary the way you wrote this test, but if you switch to using the `mock` library, it will handle it for you.