TestApp
App used for testing.
def TestApp(
name: string = None,
config: dict = None,
enable_logging: boolean = False,
set_as_current: boolean = False,
log: object = UnitLogging,
backend: string = None,
broker: string = None,
**kwargs: any
) - > Celery
App used for testing.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string = None | The name of the Celery application; defaults to 'celery.tests'. |
| config | dict = None | A dictionary of configuration settings to override the default test configuration. |
| enable_logging | boolean = False | If true, enables standard logging; otherwise, logging is suppressed or handled by the provided log object. |
| set_as_current | boolean = False | If true, sets this application instance as the current globally active Celery app. |
| log | object = UnitLogging | The logging handler to use when enable_logging is false. |
| backend | string = None | The result backend URL to use for storing task results. |
| broker | string = None | The message broker URL to use for task routing. |
| **kwargs | any | Additional keyword arguments passed directly to the Celery class constructor. |
Returns
| Type | Description |
|---|---|
Celery | A Celery application instance configured specifically for unit testing environments. |