request-mock

import requests_mock

@pytest.mark.asyncio
async def test_mock_login(
    client,
    requests_mock: requests_mock.Mocker,
):
    ....
    requests_mock.get(host, text=json.dumps(return_data))
    ....