Merge branch 'develop' of ssh://code.eliotberriot.com:2222/funkwhale/funkwhale into develop

This commit is contained in:
Eliot Berriot 2017-06-26 19:18:36 +02:00
commit f977f3a3b7
5 changed files with 12 additions and 6 deletions

View File

@ -9,8 +9,7 @@ test_api:
- cd api - cd api
- pip install -r requirements/test.txt - pip install -r requirements/test.txt
script: script:
- export DJANGO_SETTINGS_MODULE=config.settings.test - pytest
- python manage.py test
tags: tags:
- docker - docker

5
api/pytest.ini Normal file
View File

@ -0,0 +1,5 @@
[pytest]
DJANGO_SETTINGS_MODULE=config.settings.test
# -- recommended but optional:
python_files = tests.py test_*.py *_tests.py

View File

@ -5,3 +5,7 @@
flake8==2.5.0 flake8==2.5.0
model-mommy==1.3.2 model-mommy==1.3.2
tox==2.7.0 tox==2.7.0
pytest
pytest-django
pytest-sugar
pytest-xdist

View File

@ -2,4 +2,4 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker-compose -f $DIR/test.yml run test python manage.py test "$@" docker-compose -f $DIR/test.yml run test pytest "$@"

View File

@ -1,8 +1,6 @@
test: test:
dockerfile: docker/Dockerfile.test dockerfile: docker/Dockerfile.test
build: . build: .
command: python manage.py test command: pytest
volumes: volumes:
- .:/app - .:/app
environment:
- DJANGO_SETTINGS_MODULE=config.settings.test