@@ -37,9 +37,7 @@ def tearDown(self):
3737 if hasattr (self , "rtm_client" ) and not self .rtm_client ._stopped :
3838 self .rtm_client .stop ()
3939
40- @pytest .mark .skipif (
41- condition = is_not_specified (), reason = "to avoid rate_limited errors"
42- )
40+ @pytest .mark .skipif (condition = is_not_specified (), reason = "to avoid rate_limited errors" )
4341 def test_issue_631_sharing_event_loop (self ):
4442 self .success = None
4543 self .text = "This message was sent to verify issue #631"
@@ -85,9 +83,7 @@ def send_reply(**payload):
8583 if "text" in data and self .text in data ["text" ]:
8684 channel_id = data ["channel" ]
8785 thread_ts = data ["ts" ]
88- self .success = web_client .chat_postMessage (
89- channel = channel_id , text = "Thanks!" , thread_ts = thread_ts
90- )
86+ self .success = web_client .chat_postMessage (channel = channel_id , text = "Thanks!" , thread_ts = thread_ts )
9187 except Exception as e :
9288 self .logger .error (traceback .format_exc ())
9389 raise e
@@ -108,9 +104,7 @@ def connect():
108104 token = self .bot_token ,
109105 run_async = False ,
110106 )
111- new_message = self .web_client .chat_postMessage (
112- channel = self .channel_id , text = self .text
113- )
107+ new_message = self .web_client .chat_postMessage (channel = self .channel_id , text = self .text )
114108 self .assertFalse ("error" in new_message )
115109
116110 time .sleep (5 )
@@ -119,9 +113,7 @@ def connect():
119113 t .join (0.3 )
120114
121115 # Solution (2) for #631
122- @pytest .mark .skipif (
123- condition = is_not_specified (), reason = "this is just for reference"
124- )
116+ @pytest .mark .skipif (condition = is_not_specified (), reason = "this is just for reference" )
125117 @async_test
126118 async def test_issue_631_sharing_event_loop_async (self ):
127119 self .success = None
@@ -141,9 +133,7 @@ async def send_reply(**payload):
141133 if "text" in data and self .text in data ["text" ]:
142134 channel_id = data ["channel" ]
143135 thread_ts = data ["ts" ]
144- self .success = await web_client .chat_postMessage (
145- channel = channel_id , text = "Thanks!" , thread_ts = thread_ts
146- )
136+ self .success = await web_client .chat_postMessage (channel = channel_id , text = "Thanks!" , thread_ts = thread_ts )
147137 except Exception as e :
148138 self .logger .error (traceback .format_exc ())
149139 raise e
@@ -158,9 +148,7 @@ async def send_reply(**payload):
158148 token = self .bot_token ,
159149 run_async = True , # all need to be async here
160150 )
161- new_message = await self .web_client .chat_postMessage (
162- channel = self .channel_id , text = self .text
163- )
151+ new_message = await self .web_client .chat_postMessage (channel = self .channel_id , text = self .text )
164152 self .assertFalse ("error" in new_message )
165153
166154 await asyncio .sleep (5 )
0 commit comments