Aioresponses - получить данные сеанса клиента - PullRequest
0 голосов
/ 28 апреля 2020

можно получить данные отправки запросов?

from aioresponses import aioresponses
import aiohttp
import pytest

@pytest.fixture
def mocked_res():
    with aioresponses() as m:
        yield m


@pytest.mark.asyncio
async def testing_request(mocked_res):

    testing_url = "http://test.com"
    data = {"testing_data"}

    mocked_aio_response.get(testing_url)

    async with aiohttp.ClientSession() as client:
        async with client.get(testing_url, data=data) as resp:
            resp.raise_for_status()

Я хочу убедиться, что при отправке запросов правильные данные

В aioresponses есть некоторый метод match (возвращает client.response), но я не понял, как использовать это

...