File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -418,3 +418,26 @@ def test_workflow_init_not__init__():
418418 with pytest .raises (ValueError ) as err :
419419 workflow .init (BadWorkflowInit .not__init__ )
420420 assert "@workflow.init may only be used on the __init__ method" in str (err .value )
421+
422+
423+ class BadUpdateValidator :
424+ @workflow .update
425+ def my_update (self , a : str ):
426+ pass
427+
428+ @my_update .validator # type: ignore
429+ def my_validator (self , a : int ):
430+ pass
431+
432+ @workflow .run
433+ async def run (self ):
434+ pass
435+
436+
437+ def test_workflow_update_validator_not_update ():
438+ with pytest .raises (ValueError ) as err :
439+ workflow .defn (BadUpdateValidator )
440+ assert (
441+ "Update validator method my_validator parameters do not match update method my_update parameters"
442+ in str (err .value )
443+ )
You can’t perform that action at this time.
0 commit comments