def test_initiator_events(): assert not has_unlock_failure(app0) initiator_events = app0.wal.storage.get_events() secret_reveal = search_for_item(initiator_events, SendSecretReveal, {}) unlock_success = search_for_item(initiator_events, EventUnlockSuccess, {}) return secret_reveal and unlock_success
def test_mediator_events(): assert not has_unlock_failure(app1) mediator_events = app1.wal.storage.get_events() unlock_success = search_for_item(mediator_events, EventUnlockSuccess, {}) unlock_claim_success = search_for_item(mediator_events, EventUnlockClaimSuccess, {}) return unlock_success and unlock_claim_success
def test_target_events(): assert not has_unlock_failure(app2) target_events = app2.wal.storage.get_events() return (search_for_item(target_events, SendSecretRequest, {}) and search_for_item(target_events, SendSecretReveal, {}) and search_for_item(target_events, EventUnlockClaimSuccess, {}))