diff --git a/README.rst b/README.rst index ee2520b..b11a9c9 100644 --- a/README.rst +++ b/README.rst @@ -186,7 +186,40 @@ For more info check the `Schedules `__ and `pytest-django `__ +To run the tests you will need the following in addition to install requirements: + +* `py.test `__ +* `pytest-django `__ +* disque from https://github.com/antirez/disque.git +* Redis +* MongoDB + +The following commands can be used to run the tests: + +``` +# Create virtual environment +python -m venv venv + +# Install requirements +venv/bin/pip install -r requirements.txt + +# Install test dependencies +venv/bin/pip install pytest pytest-django + +# Install django-q +venv/bin/python setup.py develop + + +# Run required services (you need to have docker-compose installed) +docker-compose -f test-services-docker-compose.yaml up -d + +# Run tests +venv/bin/pytest + +# Stop the services required by tests (when you no longer plan to run tests) +docker-compose -f test-services-docker-compose.yaml down + +``` Locale diff --git a/test-services-docker-compose.yaml b/test-services-docker-compose.yaml new file mode 100644 index 0000000..9304eaa --- /dev/null +++ b/test-services-docker-compose.yaml @@ -0,0 +1,17 @@ +version: '2.2' + +services: + disque: + image: efrecon/disque:1.0-rc1 + ports: + - '7711:7711/tcp' + + redis: + image: redis:latest + ports: + - '6379:6379/tcp' + + mongo: + image: mongo:4 + ports: + - '27017:27017/tcp'