When I was trying to mock an async function in unittest with MagicMock, I got this exception:
TypeError: object MagicMock can\'t be used in \'await\' expr
shaun shia provided really good universal solution, but i found what in python 3.8 you can use just @patch('__main__.Service', new=AsyncMock)
@patch('__main__.Service', new=AsyncMock)