1
+ import re
1
2
import uuid
2
3
from dataclasses import dataclass
3
4
from typing import Any , Type
@@ -71,15 +72,6 @@ class Service:
71
72
op : Operation [Input , str ]
72
73
73
74
74
- @service_handler
75
- class SubclassingNoInputOutputTypeAnnotationsWithoutServiceDefinition :
76
- @operation_handler
77
- def op (self ) -> OperationHandler :
78
- return MyOperation ()
79
-
80
- __expected__error__ = 500 , "'dict' object has no attribute 'value'"
81
-
82
-
83
75
@service_handler (service = Service )
84
76
class SubclassingNoInputOutputTypeAnnotationsWithServiceDefinition :
85
77
# Despite the lack of annotations on the service impl, the service definition
@@ -94,7 +86,6 @@ def op(self) -> OperationHandler:
94
86
"service_handler_cls" ,
95
87
[
96
88
SubclassingHappyPath ,
97
- SubclassingNoInputOutputTypeAnnotationsWithoutServiceDefinition ,
98
89
SubclassingNoInputOutputTypeAnnotationsWithServiceDefinition ,
99
90
],
100
91
)
@@ -123,7 +114,7 @@ async def test_workflow_run_operation(
123
114
status_code , message = service_handler_cls .__expected__error__
124
115
assert resp .status_code == status_code
125
116
failure = Failure (** resp .json ())
126
- assert failure . message == message
117
+ assert re . search ( message , failure . message )
127
118
else :
128
119
assert resp .status_code == 201
129
120
0 commit comments