This document is for pytest_celery's development version, which can be significantly different from previous releases. Get the stable docs here: 1.1.
pytest_celery.vendors.redis package¶
Subpackages¶
- pytest_celery.vendors.redis.backend package
- pytest_celery.vendors.redis.broker package
Submodules¶
pytest_celery.vendors.redis.container module¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Redis vendor.
- class pytest_celery.vendors.redis.container.RedisContainer(container)[source]¶
Bases:
CeleryTestContainer
This class manages the lifecycle of a Redis container.
- property celeryconfig: dict¶
Each container is responsible for providing the configuration values required for Celery. This property should be implemented to return the configuration values for the specific container.
- Raises:
NotImplementedError – There is no config available by default.
- Returns:
Configuration values required for Celery.
- Return type:
- property client: Redis | None¶
Provides an API client for interacting with the container, if available.
Subclasses should implement this to return an instance of the client specific to the service running in the container.
- Raises:
NotImplementedError – There is not client available by default.
- Returns:
Client instance.
- Return type:
Any
- classmethod command(*args: str, debugpy: bool = False, wait_for_client: bool = True, **kwargs: dict) list[str] [source]¶
Override the CMD instruction in the Dockerfile.
This method should be overridden in derived classes to provide the specific command and its arguments required to start the container.
- Parameters:
- Raises:
NotImplementedError – Rely on the Dockerfile if not set otherwise by default.
- Returns:
- A list containing the command to run in the container as
the first element, followed by the command-line arguments.
- Return type:
pytest_celery.vendors.redis.defaults module¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Redis vendor.
Module contents¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Redis vendor.