@@ -360,7 +360,7 @@ def test_interactive_setup_persists_credentials(self, tmp_path, monkeypatch):
360360 assert "TEAMS_TENANT_ID=tenant-id" in env_text
361361
362362class TestTeamsConnect :
363- @pytest .mark .asyncio
363+ @pytest .mark .anyio
364364 async def test_connect_fails_without_sdk (self , monkeypatch ):
365365 monkeypatch .setattr (_teams_mod , "TEAMS_SDK_AVAILABLE" , False )
366366 adapter = TeamsAdapter (_make_config (
@@ -369,7 +369,7 @@ async def test_connect_fails_without_sdk(self, monkeypatch):
369369 result = await adapter .connect ()
370370 assert result is False
371371
372- @pytest .mark .asyncio
372+ @pytest .mark .anyio
373373 async def test_connect_fails_without_credentials (self ):
374374 adapter = TeamsAdapter (_make_config ())
375375 adapter ._client_id = ""
@@ -378,7 +378,7 @@ async def test_connect_fails_without_credentials(self):
378378 result = await adapter .connect ()
379379 assert result is False
380380
381- @pytest .mark .asyncio
381+ @pytest .mark .anyio
382382 async def test_disconnect_cleans_up (self ):
383383 adapter = TeamsAdapter (_make_config (
384384 client_id = "id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -400,7 +400,7 @@ async def test_disconnect_cleans_up(self):
400400# ---------------------------------------------------------------------------
401401
402402class TestTeamsSend :
403- @pytest .mark .asyncio
403+ @pytest .mark .anyio
404404 async def test_send_returns_error_without_app (self ):
405405 adapter = TeamsAdapter (_make_config (
406406 client_id = "id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -410,7 +410,7 @@ async def test_send_returns_error_without_app(self):
410410 assert result .success is False
411411 assert "not initialized" in result .error
412412
413- @pytest .mark .asyncio
413+ @pytest .mark .anyio
414414 async def test_send_calls_app_send (self ):
415415 adapter = TeamsAdapter (_make_config (
416416 client_id = "id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -426,7 +426,7 @@ async def test_send_calls_app_send(self):
426426 assert result .message_id == "msg-123"
427427 mock_app .send .assert_awaited_once_with ("conv-id" , "Hello" )
428428
429- @pytest .mark .asyncio
429+ @pytest .mark .anyio
430430 async def test_send_handles_error (self ):
431431 adapter = TeamsAdapter (_make_config (
432432 client_id = "id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -439,7 +439,7 @@ async def test_send_handles_error(self):
439439 assert result .success is False
440440 assert "Network error" in result .error
441441
442- @pytest .mark .asyncio
442+ @pytest .mark .anyio
443443 async def test_send_typing (self ):
444444 adapter = TeamsAdapter (_make_config (
445445 client_id = "id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -594,7 +594,7 @@ def _make_ctx(self, activity):
594594 ctx .activity = activity
595595 return ctx
596596
597- @pytest .mark .asyncio
597+ @pytest .mark .anyio
598598 async def test_personal_message_creates_dm_event (self ):
599599 adapter = TeamsAdapter (_make_config (
600600 client_id = "bot-id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -610,7 +610,7 @@ async def test_personal_message_creates_dm_event(self):
610610 event = adapter .handle_message .call_args [0 ][0 ]
611611 assert event .source .chat_type == "dm"
612612
613- @pytest .mark .asyncio
613+ @pytest .mark .anyio
614614 async def test_group_message_creates_group_event (self ):
615615 adapter = TeamsAdapter (_make_config (
616616 client_id = "bot-id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -625,7 +625,7 @@ async def test_group_message_creates_group_event(self):
625625 event = adapter .handle_message .call_args [0 ][0 ]
626626 assert event .source .chat_type == "group"
627627
628- @pytest .mark .asyncio
628+ @pytest .mark .anyio
629629 async def test_channel_message_creates_channel_event (self ):
630630 adapter = TeamsAdapter (_make_config (
631631 client_id = "bot-id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -640,7 +640,7 @@ async def test_channel_message_creates_channel_event(self):
640640 event = adapter .handle_message .call_args [0 ][0 ]
641641 assert event .source .chat_type == "channel"
642642
643- @pytest .mark .asyncio
643+ @pytest .mark .anyio
644644 async def test_user_id_uses_aad_object_id (self ):
645645 adapter = TeamsAdapter (_make_config (
646646 client_id = "bot-id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -655,7 +655,7 @@ async def test_user_id_uses_aad_object_id(self):
655655 event = adapter .handle_message .call_args [0 ][0 ]
656656 assert event .source .user_id == "aad-stable-id"
657657
658- @pytest .mark .asyncio
658+ @pytest .mark .anyio
659659 async def test_self_message_filtered (self ):
660660 adapter = TeamsAdapter (_make_config (
661661 client_id = "bot-id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -669,7 +669,7 @@ async def test_self_message_filtered(self):
669669
670670 adapter .handle_message .assert_not_awaited ()
671671
672- @pytest .mark .asyncio
672+ @pytest .mark .anyio
673673 async def test_bot_mention_stripped_from_text (self ):
674674 adapter = TeamsAdapter (_make_config (
675675 client_id = "bot-id" , client_secret = "secret" , tenant_id = "tenant" ,
@@ -687,7 +687,7 @@ async def test_bot_mention_stripped_from_text(self):
687687 event = adapter .handle_message .call_args [0 ][0 ]
688688 assert event .text == "what is the weather?"
689689
690- @pytest .mark .asyncio
690+ @pytest .mark .anyio
691691 async def test_deduplication (self ):
692692 adapter = TeamsAdapter (_make_config (
693693 client_id = "bot-id" , client_secret = "secret" , tenant_id = "tenant" ,
0 commit comments