diff --git a/web3/_utils/module_testing/utils.py b/web3/_utils/module_testing/utils.py index 4bce464e43..22a4408fdc 100644 --- a/web3/_utils/module_testing/utils.py +++ b/web3/_utils/module_testing/utils.py @@ -1,7 +1,6 @@ from asyncio import ( iscoroutinefunction, ) -import copy from typing import ( TYPE_CHECKING, Any, @@ -132,7 +131,7 @@ def _mock_request_handler( return self._make_request(method, params) request_id = ( - next(copy.deepcopy(self.w3.provider.request_counter)) + next(self.w3.provider.request_counter) if hasattr(self.w3.provider, "request_counter") else 1 ) @@ -201,7 +200,7 @@ async def _async_mock_request_handler( return await self._make_request(method, params) request_id = ( - next(copy.deepcopy(self.w3.provider.request_counter)) + next(self.w3.provider.request_counter) if hasattr(self.w3.provider, "request_counter") else 1 )