Disable hooks during tests.