diff --git a/swh/lister/bitbucket/tests/conftest.py b/swh/lister/bitbucket/tests/conftest.py deleted file mode 100644 --- a/swh/lister/bitbucket/tests/conftest.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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 - -import pytest - - -@pytest.fixture -def lister_under_test(): - return "bitbucket" - - -@pytest.fixture -def lister_bitbucket(swh_lister): - for task_type in [ - { - "type": "load-git", - "description": "Load git repository", - "backend_name": "swh.loader.git.tasks.UpdateGitRepository", - "default_interval": "1 day", - }, - { - "type": "load-hg", - "description": "Load hg repository", - "backend_name": "swh.loader.mercurial.tasks.LoadMercurial", - "default_interval": "1 day", - }, - ]: - swh_lister.scheduler.create_task_type(task_type) - - return swh_lister diff --git a/swh/lister/cran/tests/conftest.py b/swh/lister/cran/tests/conftest.py deleted file mode 100644 --- a/swh/lister/cran/tests/conftest.py +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright (C) 2019-2020 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 pytest - - -@pytest.fixture -def lister_under_test(): - return "cran" diff --git a/swh/lister/gitea/tests/conftest.py b/swh/lister/gitea/tests/conftest.py deleted file mode 100644 --- a/swh/lister/gitea/tests/conftest.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2019-2020 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 pytest - - -@pytest.fixture -def lister_under_test(): - return "gitea" - - -@pytest.fixture -def lister_gitea(swh_lister): - for task_type in [ - { - "type": "load-git", - "description": "Load git repository", - "backend_name": "swh.loader.git.tasks.UpdateGitRepository", - "default_interval": "1 day", - }, - ]: - swh_lister.scheduler.create_task_type(task_type) - - return swh_lister diff --git a/swh/lister/github/tests/conftest.py b/swh/lister/github/tests/conftest.py deleted file mode 100644 --- a/swh/lister/github/tests/conftest.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2019-2020 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 pytest - - -@pytest.fixture -def lister_under_test(): - return "github" - - -@pytest.fixture -def lister_github(swh_lister): - for task_type in [ - { - "type": "load-git", - "description": "Load git repository", - "backend_name": "swh.loader.git.tasks.UpdateGitRepository", - "default_interval": "1 day", - }, - ]: - swh_lister.scheduler.create_task_type(task_type) - - return swh_lister diff --git a/swh/lister/npm/tests/conftest.py b/swh/lister/npm/tests/conftest.py deleted file mode 100644 --- a/swh/lister/npm/tests/conftest.py +++ /dev/null @@ -1,11 +0,0 @@ -# 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 - -import pytest - - -@pytest.fixture -def lister_under_test(): - return "npm" diff --git a/swh/lister/phabricator/tests/conftest.py b/swh/lister/phabricator/tests/conftest.py deleted file mode 100644 --- a/swh/lister/phabricator/tests/conftest.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2019-2020 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 pytest - - -@pytest.fixture -def lister_under_test(): - return "phabricator" - - -@pytest.fixture -def lister_phabricator(swh_lister): - # Amend the credentials - swh_lister.config = { - "cache_responses": False, - "credentials": {"phabricator": {swh_lister.instance: [{"password": "foo"}]}}, - } - swh_lister.scheduler.create_task_type( - { - "type": "load-git", - "description": "Load git repository", - "backend_name": "swh.loader.git.tasks.UpdateGitRepository", - "default_interval": "1 day", - } - ) - - return swh_lister diff --git a/swh/lister/pypi/tests/conftest.py b/swh/lister/pypi/tests/conftest.py deleted file mode 100644 --- a/swh/lister/pypi/tests/conftest.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2019-2020 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 pytest - - -@pytest.fixture -def lister_under_test(): - return "pypi" - - -@pytest.fixture -def lister_pypi(swh_lister): - # Add the load-pypi in the scheduler backend - swh_lister.scheduler.create_task_type( - { - "type": "load-pypi", - "description": "Load PyPI package", - "backend_name": "swh.loader.package.tasks.LoadPyPI", - "default_interval": "1 day", - } - ) - - return swh_lister