@@ -150,7 +150,8 @@ async def test_worker_plugin_basic_config(client: Client) -> None:
150150 activities = [never_run_activity ],
151151 plugins = [MyWorkerPlugin ()],
152152 )
153- assert worker .config ().get ("task_queue" ).startswith ("replaced_queue" )
153+ task_queue = worker .config ().get ("task_queue" )
154+ assert task_queue is not None and task_queue .startswith ("replaced_queue" )
154155 assert [p .name () for p in worker .config ().get ("plugins" , [])] == [
155156 MyWorkerPlugin ().name ()
156157 ]
@@ -159,8 +160,11 @@ async def test_worker_plugin_basic_config(client: Client) -> None:
159160 new_config = client .config ()
160161 new_config ["plugins" ] = [MyCombinedPlugin ()]
161162 client = Client (** new_config )
162- worker = Worker (client , task_queue = "queue" + str (uuid .uuid4 ()), activities = [never_run_activity ])
163- assert worker .config ().get ("task_queue" ).startswith ("combined" )
163+ worker = Worker (
164+ client , task_queue = "queue" + str (uuid .uuid4 ()), activities = [never_run_activity ]
165+ )
166+ task_queue = worker .config ().get ("task_queue" )
167+ assert task_queue is not None and task_queue .startswith ("combined" )
164168 assert [p .name () for p in worker .config ().get ("plugins" , [])] == [
165169 MyCombinedPlugin ().name ()
166170 ]
@@ -172,7 +176,8 @@ async def test_worker_plugin_basic_config(client: Client) -> None:
172176 activities = [never_run_activity ],
173177 plugins = [MyWorkerPlugin ()],
174178 )
175- assert worker .config ().get ("task_queue" ).startswith ("replaced_queue" )
179+ task_queue = worker .config ().get ("task_queue" )
180+ assert task_queue is not None and task_queue .startswith ("replaced_queue" )
176181 assert [p .name () for p in worker .config ().get ("plugins" , [])] == [
177182 MyCombinedPlugin ().name (),
178183 MyWorkerPlugin ().name (),
@@ -401,6 +406,10 @@ def configure_worker(self, config: WorkerConfig) -> WorkerConfig:
401406async def test_medium_plugin (client : Client ) -> None :
402407 plugin = MediumPlugin ()
403408 worker = Worker (
404- client , task_queue = "queue" + str (uuid .uuid4 ()), plugins = [plugin ], workflows = [HelloWorkflow ]
409+ client ,
410+ task_queue = "queue" + str (uuid .uuid4 ()),
411+ plugins = [plugin ],
412+ workflows = [HelloWorkflow ],
405413 )
406- assert worker .config ().get ("task_queue" ).startswith ("override" )
414+ task_queue = worker .config ().get ("task_queue" )
415+ assert task_queue is not None and task_queue .startswith ("override" )
0 commit comments