mock_aioresponse = <aioresponses.core.aioresponses object at 0x7fcefc2a3390>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
aiosession = <async_generator object aiosession at 0x7fcefc2a9510>
def test_client_known_correct_api_request(mock_aioresponse, event_loop, aiosession):
mock_aioresponse.post(
KNOWN_URL,
status=200,
content_type="application/json",
body=json.dumps(correct_known_api_response),
)
client = Client(AIO_URL, aiosession)
> actual_result = event_loop.run_until_complete(client.known([]))
.tox/py3/lib/python3.7/site-packages/swh/scanner/tests/test_client.py:30:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
.tox/py3/lib/python3.7/site-packages/swh/scanner/client.py:96: in known
return await make_request(swhids)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
swhids = []
async def make_request(swhids):
swhids = [str(swhid) for swhid in swhids]
> async with self.session.post(endpoint, json=swhids) as resp:
E AttributeError: 'async_generator' object has no attribute 'post'
.tox/py3/lib/python3.7/site-packages/swh/scanner/client.py:82: AttributeError
TEST RESULT
TEST RESULT
- Run At
- May 9 2022, 12:44 PM