Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9339203
test_tasks.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
933 B
Subscribers
None
test_tasks.py
View Options
# Copyright (C) 2022 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
swh.lister.pattern
import
ListerStats
NAMESPACE
=
"swh.lister.nixguix"
def
test_nixguix_lister
(
swh_scheduler_celery_app
,
swh_scheduler_celery_worker
,
mocker
):
# setup the mocked ArchLister
lister
=
mocker
.
patch
(
f
"{NAMESPACE}.lister.NixGuixLister"
)
lister
.
from_configfile
.
return_value
=
lister
stats
=
ListerStats
(
pages
=
1
,
origins
=
42
)
lister
.
run
.
return_value
=
stats
res
=
swh_scheduler_celery_app
.
send_task
(
f
"{NAMESPACE}.tasks.NixGuixListerTask"
,
)
assert
res
res
.
wait
()
assert
res
.
successful
()
assert
res
.
result
==
stats
.
dict
()
lister
.
from_configfile
.
assert_called_once_with
()
lister
.
run
.
assert_called_once_with
()
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Jul 4 2025, 9:30 AM (5 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3241484
Attached To
rDLS Listers
Event Timeline
Log In to Comment