Skip to content

Commit 9da5e69

Browse files
authored
Use non-test name for workflow classes (#736)
1 parent 9e34301 commit 9da5e69

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/worker/test_workflow.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5841,7 +5841,7 @@ async def test_workflow_id_conflict(client: Client):
58415841

58425842

58435843
@workflow.defn
5844-
class TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1:
5844+
class UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow:
58455845
def __init__(self) -> None:
58465846
self.workflow_returned = False
58475847

@@ -5867,13 +5867,13 @@ async def test_update_completion_is_honored_when_after_workflow_return_1(
58675867
update_id = "my-update"
58685868
task_queue = "tq"
58695869
wf_handle = await client.start_workflow(
5870-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1.run,
5870+
UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow.run,
58715871
id=f"wf-{uuid.uuid4()}",
58725872
task_queue=task_queue,
58735873
)
58745874
update_result_task = asyncio.create_task(
58755875
wf_handle.execute_update(
5876-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1.my_update,
5876+
UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow.my_update,
58775877
id=update_id,
58785878
)
58795879
)
@@ -5882,14 +5882,14 @@ async def test_update_completion_is_honored_when_after_workflow_return_1(
58825882
async with Worker(
58835883
client,
58845884
task_queue=task_queue,
5885-
workflows=[TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1],
5885+
workflows=[UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow],
58865886
):
58875887
assert await wf_handle.result() == "workflow-result"
58885888
assert await update_result_task == "update-result"
58895889

58905890

58915891
@workflow.defn
5892-
class TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2:
5892+
class UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2:
58935893
def __init__(self):
58945894
self.received_update = False
58955895
self.update_result: asyncio.Future[str] = asyncio.Future()
@@ -5923,15 +5923,15 @@ async def test_update_completion_is_honored_when_after_workflow_return_2(
59235923
async with Worker(
59245924
client,
59255925
task_queue="tq",
5926-
workflows=[TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2],
5926+
workflows=[UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2],
59275927
) as worker:
59285928
handle = await client.start_workflow(
5929-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.run,
5929+
UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.run,
59305930
id=f"wf-{uuid.uuid4()}",
59315931
task_queue=worker.task_queue,
59325932
)
59335933
update_result = await handle.execute_update(
5934-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.my_update
5934+
UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.my_update
59355935
)
59365936
assert update_result == "update-result"
59375937
assert await handle.result() == "workflow-result"

0 commit comments

Comments
 (0)