Fix test case for check_hooks.