Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bstiel/python-celery-testing-chains
https://www.distributedpython.com/2018/05/15/testing-celery-chains/
https://github.com/bstiel/python-celery-testing-chains
Last synced: 3 months ago
JSON representation
https://www.distributedpython.com/2018/05/15/testing-celery-chains/
- Host: GitHub
- URL: https://github.com/bstiel/python-celery-testing-chains
- Owner: bstiel
- Created: 2018-06-27T08:40:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-27T10:56:22.000Z (over 6 years ago)
- Last Synced: 2024-05-19T23:35:48.584Z (6 months ago)
- Language: Python
- Homepage: https://www.distributedpython.com/2018/05/15/testing-celery-chains/
- Size: 3.91 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Unit Testing Celery Tasks
This projects contains the source code examples accompanying the blog post: https://python-celery.com/2018/05/15/testing-celery-chains/.
Docker use is highly recommended.
## With docker
1. Bring up the docker stack:
```docker-compose up -d```2. Run unit tests:
```docker-compose exec app pyton -m unittest discover -vv```## Without docker
1. Install and start [RabbitMQ](https://www.rabbitmq.com):
Ensure RabbitMQ runs on port 5672 and the user `user` with password `password` is set up2. Create virtual environment:
```virtualenv celery-unit-test```3. Activate virtual environment:
```source activate celery-unit-test```4. Install pip packages:
```pip install -r requirements.txt```5. Run unit tests:
```RABBITMQ_DEFAULT_USER=user CELERY_BROKER_URL=amqp://user:password@localhost:5672 python -m unittest discover -vv```