2525
2626def _clear_listener_on_rerun (endpoint : Endpoint ):
2727 def decorator (func ):
28- async def wrapper (self , client : Client , app : Application ):
28+ async def wrapper (self , client : Client , app : Application ):
2929 if client .get_listener (endpoint ):
3030 client .remove_listener (endpoint )
3131 return await func (self , client , app )
32+
3233 return wrapper
34+
3335 return decorator
3436
3537
@@ -144,9 +146,7 @@ async def test_listener(response: Response):
144146
145147 @_clear_listener_on_rerun (Endpoint .files_list ())
146148 async def test_request_app_files_list (
147- self ,
148- client : Client ,
149- app : Application
149+ self , client : Client , app : Application
150150 ):
151151 endpoint : Endpoint = Endpoint .files_list ()
152152 expected_result : list [FileInfo ] | None
@@ -205,9 +205,7 @@ async def test_listener(response: Response):
205205 nonlocal expected_response
206206 expected_response = response
207207
208- expected_result = await client .delete_app_file (
209- app .id , '/test.txt'
210- )
208+ expected_result = await client .delete_app_file (app .id , '/test.txt' )
211209 assert isinstance (expected_result , Response )
212210 assert isinstance (expected_response , Response )
213211
@@ -222,9 +220,7 @@ async def test_listener(response: Response):
222220 nonlocal expected_response
223221 expected_response = response
224222
225- expected_result = await client .commit (
226- app .id , File ('tests/test.txt' )
227- )
223+ expected_result = await client .commit (app .id , File ('tests/test.txt' ))
228224 assert isinstance (expected_result , Response )
229225 assert isinstance (expected_response , Response )
230226
@@ -277,8 +273,7 @@ async def test_listener(response: Response):
277273 assert isinstance (expected_response , Response )
278274
279275 @pytest .mark .skipif (
280- lambda app : not app .is_website ,
281- reason = 'application is not website'
276+ lambda app : not app .is_website , reason = 'application is not website'
282277 )
283278 @_clear_listener_on_rerun (Endpoint .domain_analytics ())
284279 async def test_domain_analytics (self , client : Client , app : Application ):
@@ -296,8 +291,7 @@ async def test_listener(response: Response):
296291 assert isinstance (expected_response , Response )
297292
298293 @pytest .mark .skipif (
299- lambda app : not app .is_website ,
300- reason = 'application is not website'
294+ lambda app : not app .is_website , reason = 'application is not website'
301295 )
302296 @_clear_listener_on_rerun (Endpoint .custom_domain ())
303297 async def test_set_custom_domain (self , client : Client , app : Application ):
@@ -367,7 +361,7 @@ async def test_listener(response: Response):
367361 assert isinstance (expected_response , Response )
368362
369363 @_clear_listener_on_rerun (Endpoint .dns_records ())
370- async def test_move_app_file (self , client : Client , app : Application ):
364+ async def test_dns_records (self , client : Client , app : Application ):
371365 endpoint : Endpoint = Endpoint .dns_records ()
372366 expected_result : list [DNSRecord ] | None
373367 expected_response : Response | None = None
0 commit comments