from unittest.mock import patch


def dont_handle_locked_expired_mock(app):
    """Takes in a raiden app and returns a mock context where locke expired is not processed
    """
    def do_nothing(raiden, message):
        pass

    return patch.object(
        app.raiden.message_handler,
        'handle_message_lockexpired',
        side_effect=do_nothing,
    )