Skip to content

Commit 7722f3e

Browse files
committed
fix: handle AsyncMock import for older Python versions in async agent tests
1 parent 1a73ac4 commit 7722f3e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/scenario_tests_async/test_events_agent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import asyncio
22
import json
3-
from unittest.mock import AsyncMock, MagicMock
3+
try:
4+
from unittest.mock import AsyncMock, MagicMock
5+
except ImportError:
6+
from mock import AsyncMock, MagicMock # type: ignore
47

58
import pytest
69
from slack_sdk.web.async_client import AsyncWebClient

0 commit comments

Comments
 (0)