Mock is_timeout function