Prevent redirections in tests.