live_server = <[AttributeError("'LiveServer' object has no attribute 'url'") raised in repr()] LiveServer object at 0x7fcee6a6ada0>
aiosession = <async_generator object aiosession at 0x7fcefc2eb620>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
source_tree_policy = Directory(id=fe8cd7076bef324eb8865f818ef08617879022ce, entries=[b'some-binary', b'foo', b'toexclude', b'bar'])
tmp_requests = local('/tmp/pytest-of-jenkins/pytest-0/data0/requests.json')
def test_file_priority_policy(
live_server, aiosession, event_loop, source_tree_policy, tmp_requests
):
open(tmp_requests, "w").close()
api_url = url_for("index", _external=True)
nodes_data = MerkleNodeInfo()
init_merkle_node_info(source_tree_policy, nodes_data, {"known"})
policy = FilePriority(source_tree_policy, 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:104:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/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:125: in run
cnt_status_res = await client.known(cnt_swhids)
.tox/py3/lib/python3.7/site-packages/swh/scanner/client.py:96: in known
return await make_request(swhids)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
swhids = ['swh:1:cnt:133693b125bad2b4ac318535b84901ebb1f6b638', 'swh:1:cnt:620d4582bfbf773ef15f9b52ac434906a3cdf9c3', 'swh:1:cn...6a326a119', 'swh:1:cnt:7c4c57ba9ff496ad179b8f65b1d286edbda34c9a', 'swh:1:cnt:68769579c3eaadbe555379b9c3538e6628bae1eb']
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