@@ -360,20 +360,39 @@ async def test_listener(response: Response):
360360 assert isinstance (expected_result , Response )
361361 assert isinstance (expected_response , Response )
362362
363- @_clear_listener_on_rerun (Endpoint .dns_records ())
364- async def test_dns_records (self , client : Client , app : Application ):
365- endpoint : Endpoint = Endpoint .dns_records ()
366- expected_result : list [DNSRecord ] | None
363+ # @_clear_listener_on_rerun(Endpoint.dns_records())
364+ # @pytest.mark.skipif(
365+ # lambda app: not app.custom,
366+ # reason='app have not custom domain',
367+ # )
368+ # async def test_dns_records(self, client: Client, app: Application):
369+ # endpoint: Endpoint = Endpoint.dns_records()
370+ # expected_result: list[DNSRecord] | None
371+ # expected_response: Response | None = None
372+ #
373+ # @client.on_request(endpoint)
374+ # async def test_listener(response: Response):
375+ # nonlocal expected_response
376+ # expected_response = response
377+ #
378+ # expected_result = await client.dns_records(app.id)
379+ # assert isinstance(expected_result, list)
380+ # assert isinstance(expected_result[0], DNSRecord)
381+ # assert isinstance(expected_response, Response)
382+
383+ @_clear_listener_on_rerun (Endpoint .current_integration ())
384+ async def test_current (self , client : Client , app : Application ):
385+ endpoint : Endpoint = Endpoint .current_integration ()
386+ expected_result : str | None
367387 expected_response : Response | None = None
368388
369389 @client .on_request (endpoint )
370390 async def test_listener (response : Response ):
371391 nonlocal expected_response
372392 expected_response = response
373393
374- expected_result = await client .dns_records (app .id )
375- assert isinstance (expected_result , list )
376- assert isinstance (expected_result [0 ], DNSRecord )
394+ expected_result = await client .current_app_integration (app .id )
395+ assert isinstance (expected_result , str )
377396 assert isinstance (expected_response , Response )
378397
379398 @_clear_listener_on_rerun (endpoint = Endpoint .app_status ())
0 commit comments