Page MenuHomeSoftware Heritage

test_tasks.py
No OneTemporary

test_tasks.py

# Copyright (C) 2019 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from unittest.mock import patch
@patch('swh.loader.package.archive.loader.ArchiveLoader.load')
def test_archive_loader(
mock_loader, swh_app, celery_session_worker, swh_config):
mock_loader.return_value = {'status': 'eventful'}
res = swh_app.send_task(
'swh.loader.package.archive.tasks.LoadArchive',
(), dict(url='some-url', artifacts=[]))
assert res
res.wait()
assert res.successful()
assert res.result == {'status': 'eventful'}

File Metadata

Mime Type
text/x-python
Expires
Fri, Jul 4, 4:05 PM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3356771

Event Timeline