File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ def routing_key(self) -> str | None:
2424class RPCNamespacedMethodName (ConstrainedStr ):
2525 min_length : int = 1
2626 max_length : int = 255
27- regex : re . Pattern [ str ] | None = re . compile ( REGEX_RABBIT_QUEUE_ALLOWED_SYMBOLS )
27+ pattern : str = REGEX_RABBIT_QUEUE_ALLOWED_SYMBOLS
2828
2929 @classmethod
3030 def from_namespace_and_method (
Original file line number Diff line number Diff line change @@ -350,11 +350,12 @@ async def _a_handler() -> None:
350350 pass
351351
352352 if expect_fail :
353- with pytest .raises (ValidationError ) as exec_info :
353+ with pytest .raises (
354+ ValidationError , match = r"String should have at most \d+ characters"
355+ ):
354356 await rpc_server .register_handler (
355357 RPCNamespace ("a" ), RPCMethodName (handler_name ), _a_handler
356358 )
357- assert "String should have at most 252 characters" in f"{ exec_info .value } "
358359 else :
359360 await rpc_server .register_handler (
360361 RPCNamespace ("a" ), RPCMethodName (handler_name ), _a_handler
You can’t perform that action at this time.
0 commit comments