Skip to content

Commit

Permalink
Fix failing tests by putting request first
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Feb 3, 2024
1 parent 20521e1 commit a08d268
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/api/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@

@pytest.mark.parametrize("backend", [CELERY_BACKEND])
class test_celey_test_backend:
def test_default_config_format(self, backend: CeleryTestBackend, request):
def test_default_config_format(self, request, backend: CeleryTestBackend):
backend = request.getfixturevalue(backend)
assert backend.default_config()["url"] == DEFAULT_WORKER_ENV["CELERY_RESULT_BACKEND"]
assert backend.default_config()["host_url"] == DEFAULT_WORKER_ENV["CELERY_RESULT_BACKEND"]

def test_restart_no_app(self, backend: CeleryTestBackend, request):
def test_restart_no_app(self, request, backend: CeleryTestBackend):
backend = request.getfixturevalue(backend)
assert backend.app is None
backend.restart()

def test_restart_with_app(self, backend: CeleryTestBackend, celery_setup_app: Celery, request):
def test_restart_with_app(self, request, backend: CeleryTestBackend, celery_setup_app: Celery):
backend = request.getfixturevalue(backend)
backend._app = celery_setup_app
assert "result_backend" not in celery_setup_app.conf.changes
Expand Down

0 comments on commit a08d268

Please sign in to comment.