def METHOD_NAME(self, params):
    class TaskIgnoreSigterm(common.Task):
        ignore_sigterm = True
        def execute(self):
            return None
    task = TaskIgnoreSigterm(params)
    task_mock = flexmock(TaskIgnoreSigterm)
    task_mock.should_receive("execute").once()
    signal_mock = flexmock(signal)
    signal_mock.should_receive("signal").with_args(signal.SIGTERM, signal.SIG_IGN).once()
    signal_mock.should_receive("signal").with_args(signal.SIGTERM, signal.SIG_DFL).once()
    task.run()