From 35d8f4d85627d9f11c237b0fa2944a9a1806cd8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8E=98=E6=9D=83=20=E9=A9=AC?= Date: Fri, 12 Jan 2024 16:00:20 +0800 Subject: [PATCH] fixbug: unit test --- tests/metagpt/utils/test_redis.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/metagpt/utils/test_redis.py b/tests/metagpt/utils/test_redis.py index 5d6eb1042..748c44f54 100644 --- a/tests/metagpt/utils/test_redis.py +++ b/tests/metagpt/utils/test_redis.py @@ -8,7 +8,6 @@ from unittest.mock import AsyncMock import pytest -from pytest_mock import mocker from metagpt.config2 import Config from metagpt.utils.redis import Redis @@ -22,7 +21,7 @@ async def async_mock_from_url(*args, **kwargs): @pytest.mark.asyncio -async def test_redis(i): +async def test_redis(mocker): redis = Config.default().redis mocker.patch("aioredis.from_url", return_value=async_mock_from_url())