tamio

Results 1 comments of tamio

hi, I share an alternative way to mock AsyncSession ``` from unittest.mock import AsyncMock from unittest.mock import MagicMock @pytest.mark.asyncio async def test_get_investment_record_by_id(): mock_result = MagicMock() mock_result.scalars.return_value.first.return_value = user_obj mock_db =...