Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9314305
test_tasks.py
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
847 B
Subscribers
None
test_tasks.py
View Options
# Copyright (C) 2019-2021 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
def
test_tasks_cran_loader
(
mocker
,
swh_scheduler_celery_app
,
swh_scheduler_celery_worker
,
swh_config
):
mock_load
=
mocker
.
patch
(
"swh.loader.package.cran.loader.CRANLoader.load"
)
mock_load
.
return_value
=
{
"status"
:
"eventful"
}
res
=
swh_scheduler_celery_app
.
send_task
(
"swh.loader.package.cran.tasks.LoadCRAN"
,
kwargs
=
dict
(
url
=
"some-url"
,
artifacts
=
[{
"version"
:
"1.2.3"
,
"url"
:
"artifact-url"
}],
),
)
assert
res
res
.
wait
()
assert
res
.
successful
()
assert
mock_load
.
called
assert
res
.
result
==
{
"status"
:
"eventful"
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 3, 12:21 PM (2 d, 11 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3298717
Attached To
rDLDBASE Generic VCS/Package Loader
Event Timeline
Log In to Comment