@@ -81,6 +81,42 @@ async def test_string_keyword(self):
8181 await asyncio .sleep (1 ) # wait a bit after auto ack()
8282 assert self .mock_received_requests ["/chat.postMessage" ] == 1
8383
84+ @pytest .mark .asyncio
85+ async def test_all_message_matching_1 (self ):
86+ app = AsyncApp (
87+ client = self .web_client ,
88+ signing_secret = self .signing_secret ,
89+ )
90+
91+ @app .message ("" )
92+ async def handle_all_new_messages (say ):
93+ await say ("Thanks!" )
94+
95+ request = self .build_request2 ()
96+ response = await app .async_dispatch (request )
97+ assert response .status == 200
98+ await assert_auth_test_count_async (self , 1 )
99+ await asyncio .sleep (1 ) # wait a bit after auto ack()
100+ assert self .mock_received_requests ["/chat.postMessage" ] == 1
101+
102+ @pytest .mark .asyncio
103+ async def test_all_message_matching_2 (self ):
104+ app = AsyncApp (
105+ client = self .web_client ,
106+ signing_secret = self .signing_secret ,
107+ )
108+
109+ @app .message ()
110+ async def handle_all_new_messages (say ):
111+ await say ("Thanks!" )
112+
113+ request = self .build_request2 ()
114+ response = await app .async_dispatch (request )
115+ assert response .status == 200
116+ await assert_auth_test_count_async (self , 1 )
117+ await asyncio .sleep (1 ) # wait a bit after auto ack()
118+ assert self .mock_received_requests ["/chat.postMessage" ] == 1
119+
84120 @pytest .mark .asyncio
85121 async def test_string_keyword_capturing (self ):
86122 app = AsyncApp (
0 commit comments