Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9348453
test_tasks.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
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
import
uuid
import
pytest
from
swh.scheduler.model
import
ListedOrigin
,
Lister
NAMESPACE
=
"swh.loader.package.arch"
@pytest.fixture
def
arch_lister
():
return
Lister
(
name
=
"arch"
,
instance_name
=
"example"
,
id
=
uuid
.
uuid4
())
@pytest.fixture
def
arch_listed_origin
(
arch_lister
):
return
ListedOrigin
(
lister_id
=
arch_lister
.
id
,
url
=
"some-url/packages/s/some-package"
,
visit_type
=
"arch"
,
extra_loader_arguments
=
{
"artifacts"
:
[
{
"version"
:
"0.0.1"
,
"url"
:
"https://somewhere/some-package-0.0.1.pkg.xz"
,
"filename"
:
"some-package-0.0.1.pkg.xz"
,
"length"
:
42
,
}
],
"arch_metadata"
:
[
{
"version"
:
"0.0.1"
,
"arch"
:
"aarch64"
,
"name"
:
"some-package"
,
"repo"
:
"community"
,
"last_modified"
:
"1970-01-01T21:08:14"
,
}
],
},
)
def
test_arch_loader_task_for_listed_origin
(
loading_task_creation_for_listed_origin_test
,
arch_lister
,
arch_listed_origin
,
):
loading_task_creation_for_listed_origin_test
(
loader_class_name
=
f
"{NAMESPACE}.loader.ArchLoader"
,
task_function_name
=
f
"{NAMESPACE}.tasks.LoadArch"
,
lister
=
arch_lister
,
listed_origin
=
arch_listed_origin
,
)
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Jul 4 2025, 6:31 PM (5 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3237166
Attached To
rDLDBASE Generic VCS/Package Loader
Event Timeline
Log In to Comment