nutritious-telephone-58961
12/23/2024, 2:45 AMwait_for_input
gate. Am I using the function wrong? Thanks!nutritious-telephone-58961
12/23/2024, 2:54 AMdef test_signal_approve_reject(register):
remote = FlyteRemote(Config.auto(config_file=CONFIG), PROJECT, DOMAIN)
conditional_wf = remote.fetch_workflow(name="basic.conditional_wf.signal_test_wf", version=VERSION)
execution = remote.execute(conditional_wf, inputs={"data": [1.0, 2.0, 3.0, 4.0, 5.0]})
# remote.set_input("title-input", execution.id.name, value="my report")
# remote.approve("review-passes", execution.id.name)
remote.set_signal("title-input", execution.id.name, value="my report")
remote.set_signal("review-passes", execution.id.name, value=True)
remote.wait(execution=execution, timeout=datetime.timedelta(minutes=5))
assert execution.outputs["o0"] == {"title": "my report", "data": [1.0, 2.0, 3.0, 4.0, 5.0]}
execution = remote.execute(conditional_wf, inputs={"data": [1.0, 2.0, 3.0, 4.0, 5.0]})
# remote.set_input("title-input", execution.id.name, value="my report")
# remote.reject("review-passes", execution.id.name)
remote.set_signal("title-input", execution.id.name, value="my report")
remote.set_signal("review-passes", execution.id.name, value=False)
remote.wait(execution=execution, timeout=datetime.timedelta(minutes=5))
assert execution.outputs["o0"] == {"invalid_report": True}