Changeset View
Changeset View
Standalone View
Standalone View
swh/lister/npm/tests/conftest.py
# Copyright (C) 2019-2020 The Software Heritage developers | # Copyright (C) 2019-2021 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import pytest | import pytest | ||||
@pytest.fixture | @pytest.fixture | ||||
def lister_under_test(): | def lister_under_test(): | ||||
return "npm" | return "npm" | ||||
@pytest.fixture | |||||
def lister_npm(swh_lister): | |||||
# Add the load-npm in the scheduler backend | |||||
swh_lister.scheduler.create_task_type( | |||||
{ | |||||
"type": "load-npm", | |||||
"description": "Load npm package", | |||||
"backend_name": "swh.loader.package.tasks.LoadNpm", | |||||
"default_interval": "1 day", | |||||
} | |||||
) | |||||
return swh_lister |