Skip to content

Commit 4ca920c

Browse files
committed
Use non-test name for workflow classes
1 parent 9cbf307 commit 4ca920c

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
@@ -5840,7 +5840,7 @@ async def test_workflow_id_conflict(client: Client):
58405840

58415841

58425842
@workflow.defn
5843-
class TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1:
5843+
class UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow:
58445844
def __init__(self) -> None:
58455845
self.workflow_returned = False
58465846

@@ -5866,13 +5866,13 @@ async def test_update_completion_is_honored_when_after_workflow_return_1(
58665866
update_id = "my-update"
58675867
task_queue = "tq"
58685868
wf_handle = await client.start_workflow(
5869-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1.run,
5869+
UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow.run,
58705870
id=f"wf-{uuid.uuid4()}",
58715871
task_queue=task_queue,
58725872
)
58735873
update_result_task = asyncio.create_task(
58745874
wf_handle.execute_update(
5875-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1.my_update,
5875+
UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow.my_update,
58765876
id=update_id,
58775877
)
58785878
)
@@ -5881,14 +5881,14 @@ async def test_update_completion_is_honored_when_after_workflow_return_1(
58815881
async with Worker(
58825882
client,
58835883
task_queue=task_queue,
5884-
workflows=[TestUpdateCompletionIsHonoredWhenAfterWorkflowReturn1],
5884+
workflows=[UpdateCompletionIsHonoredWhenAfterWorkflowReturn1Workflow],
58855885
):
58865886
assert await wf_handle.result() == "workflow-result"
58875887
assert await update_result_task == "update-result"
58885888

58895889

58905890
@workflow.defn
5891-
class TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2:
5891+
class UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2:
58925892
def __init__(self):
58935893
self.received_update = False
58945894
self.update_result: asyncio.Future[str] = asyncio.Future()
@@ -5922,15 +5922,15 @@ async def test_update_completion_is_honored_when_after_workflow_return_2(
59225922
async with Worker(
59235923
client,
59245924
task_queue="tq",
5925-
workflows=[TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2],
5925+
workflows=[UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2],
59265926
) as worker:
59275927
handle = await client.start_workflow(
5928-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.run,
5928+
UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.run,
59295929
id=f"wf-{uuid.uuid4()}",
59305930
task_queue=worker.task_queue,
59315931
)
59325932
update_result = await handle.execute_update(
5933-
TestUpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.my_update
5933+
UpdateCompletionIsHonoredWhenAfterWorkflowReturnWorkflow2.my_update
59345934
)
59355935
assert update_result == "update-result"
59365936
assert await handle.result() == "workflow-result"

0 commit comments

Comments
 (0)