Drop mock_get_scheduler which creates indirection for no good reason

This is no longer useful, as removing it and tests are still ok.
This commit is contained in:
Antoine R. Dumont (@ardumont) 2020-10-16 14:30:54 +02:00
parent 2ff92ef406
commit 30ad6200a2
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
3 changed files with 2 additions and 22 deletions

View file

@ -5,24 +5,6 @@
import os
import pytest
pytest_plugins = ["swh.scheduler.pytest_plugin", "swh.lister.pytest_plugin"]
os.environ["LC_ALL"] = "C.UTF-8"
@pytest.fixture
def mock_get_scheduler(monkeypatch, swh_scheduler):
"""Override the get_scheduler function in swh.lister.core.lister_base, to
return the swh_scheduler fixture.
"""
from swh.lister.core import lister_base
# Match the signature from swh.scheduler.get_scheduler
def get_scheduler(cls, args={}):
return swh_scheduler
monkeypatch.setattr(lister_base, "get_scheduler", get_scheduler)
yield monkeypatch