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.memcached package¶
Submodules¶
pytest_celery.vendors.memcached.api module¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Memcached Backend vendor.
- class pytest_celery.vendors.memcached.api.MemcachedTestBackend(container: CeleryTestContainer, app: Celery = None)[source]¶
Bases:
CeleryTestBackend
pytest_celery.vendors.memcached.container module¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Memcached Backend vendor.
- class pytest_celery.vendors.memcached.container.MemcachedContainer(container)[source]¶
Bases:
CeleryTestContainer
This class manages the lifecycle of a Memcached 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: Client¶
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
pytest_celery.vendors.memcached.defaults module¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Memcached Backend vendor.
pytest_celery.vendors.memcached.fixtures module¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Memcached Backend vendor.
- pytest_celery.vendors.memcached.fixtures.celery_memcached_backend(default_memcached_backend: MemcachedContainer) MemcachedTestBackend [source]¶
Creates a MemcachedTestBackend instance. Responsible for tearing down the node.
- Parameters:
default_memcached_backend (MemcachedContainer) – Instantiated MemcachedContainer.
- pytest_celery.vendors.memcached.fixtures.default_memcached_backend_cls() type[MemcachedContainer] [source]¶
Default Memcached backend container class. Override to apply custom configuration globally.
See also: Vendor Class.
- Returns:
API for managing the vendor’s container.
- Return type:
- pytest_celery.vendors.memcached.fixtures.default_memcached_backend_env(default_memcached_backend_cls: type[MemcachedContainer]) dict [source]¶
Environment variables for this vendor.
- Parameters:
default_memcached_backend_cls (type[MemcachedContainer]) – See also: Vendor Class.
- Returns:
Items to pass to the container’s environment.
- Return type:
- pytest_celery.vendors.memcached.fixtures.default_memcached_backend_image(default_memcached_backend_cls: type[MemcachedContainer]) str [source]¶
Docker image for this vendor.
- Parameters:
default_memcached_backend_cls (type[MemcachedContainer]) – See also: Vendor Class.
- Returns:
Docker image name.
- Return type:
- pytest_celery.vendors.memcached.fixtures.default_memcached_backend_ports(default_memcached_backend_cls: type[MemcachedContainer]) dict [source]¶
Port bindings for this vendor.
- Parameters:
default_memcached_backend_cls (type[MemcachedContainer]) – See also: Vendor Class.
- Returns:
Port bindings.
- Return type:
Module contents¶
The pytest-celery plugin provides a set of built-in components called Vendors.
This module is part of the Memcached Backend vendor.