Use the new names for the swh.scheduler test fixtures

This commit is contained in:
Nicolas Dandrimont 2020-07-09 12:14:42 +02:00
parent 014c446d05
commit c9963d4302
19 changed files with 170 additions and 86 deletions

View file

@ -1,8 +1,13 @@
# 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
from unittest.mock import patch
def test_ping(swh_app, celery_session_worker):
res = swh_app.send_task("swh.lister.cgit.tasks.ping")
def test_ping(swh_scheduler_celery_app, swh_scheduler_celery_worker):
res = swh_scheduler_celery_app.send_task("swh.lister.cgit.tasks.ping")
assert res
res.wait()
assert res.successful()
@ -10,12 +15,12 @@ def test_ping(swh_app, celery_session_worker):
@patch("swh.lister.cgit.tasks.CGitLister")
def test_lister(lister, swh_app, celery_session_worker):
def test_lister(lister, swh_scheduler_celery_app, swh_scheduler_celery_worker):
# setup the mocked CGitLister
lister.return_value = lister
lister.run.return_value = None
res = swh_app.send_task(
res = swh_scheduler_celery_app.send_task(
"swh.lister.cgit.tasks.CGitListerTask",
kwargs=dict(url="https://git.kernel.org/", instance="kernel"),
)