live_server = <[AttributeError("'LiveServer' object has no attribute 'url'") raised in repr()] LiveServer object at 0x7fcee6a6ada0>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
aiosession = <async_generator object aiosession at 0x7fcee6a20048>
big_source_tree = Directory(id=731eb28823efc1107f1595d2cdef1513883824dd, entries=[b'dir'])
tmp_requests = local('/tmp/pytest-of-jenkins/pytest-0/data0/requests.json')
def test_greedy_bfs_policy(
live_server, event_loop, aiosession, big_source_tree, tmp_requests
):
open(tmp_requests, "w").close()
api_url = url_for("index", _external=True)
nodes_data = MerkleNodeInfo()
init_merkle_node_info(big_source_tree, nodes_data, {"known"})
policy = GreedyBFS(big_source_tree, nodes_data)
client = Client(api_url, aiosession)
> event_loop.run_until_complete(policy.run(client))
.tox/py3/lib/python3.7/site-packages/swh/scanner/tests/test_policy.py:125:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/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/policy.py:77: in run
async for nodes_chunk in self.get_nodes_chunks(client, ssize):
.tox/py3/lib/python3.7/site-packages/swh/scanner/policy.py:99: in get_nodes_chunks
swhids_res = await client.known(swhids)
.tox/py3/lib/python3.7/site-packages/swh/scanner/client.py:96: in known
return await make_request(swhids)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
swhids = ['swh:1:dir:731eb28823efc1107f1595d2cdef1513883824dd', 'swh:1:dir:6623effb609864b06dfa6ddf0404de9587947a58', 'swh:1:di...6ade', 'swh:1:dir:82af544993b9ac8e2726aa87332574792ca80850', 'swh:1:dir:aa3f5dcbf74e83f2ac3a907265065d4e08c74ebb', ...]
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