Skip to content

Commit

Permalink
Bugfix: Typo celery_version -> default_worker_celery_version in range…
Browse files Browse the repository at this point in the history
… example
  • Loading branch information
Nusnus committed Feb 12, 2024
1 parent 3f08a58 commit b91cbc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/userguide/examples/range.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ to the worker fixture, and will generate a different worker for each Celery vers
class TestRange:
@pytest.fixture(scope="session", params=get_celery_versions("v4.4.7", "v5.0.0"))
def celery_version(self, request: pytest.FixtureRequest) -> str:
def default_worker_celery_version(self, request: pytest.FixtureRequest) -> str:
return request.param
Following up with this simple test case will produce a test run for each Celery version in the list.

.. code-block:: python
def test_ping(self, celery_setup: CeleryTestSetup, celery_version: str):
def test_ping(self, celery_setup: CeleryTestSetup, default_worker_celery_version: str):
sig: Signature = ping.s()
res: AsyncResult = sig.apply_async()
assert res.get(timeout=RESULT_TIMEOUT) == "pong"
Expand Down
4 changes: 2 additions & 2 deletions examples/range/tests/test_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

class TestRange:
@pytest.fixture(scope="session", params=get_celery_versions("v4.4.7", "v5.0.0"))
def celery_version(self, request: pytest.FixtureRequest) -> str:
def default_worker_celery_version(self, request: pytest.FixtureRequest) -> str:
return request.param

def test_ping(self, celery_setup: CeleryTestSetup, celery_version: str):
def test_ping(self, celery_setup: CeleryTestSetup, default_worker_celery_version: str):
sig: Signature = ping.s()
res: AsyncResult = sig.apply_async()
assert res.get(timeout=RESULT_TIMEOUT) == "pong"

0 comments on commit b91cbc3

Please sign in to comment.