Révision e365818a
Ajouté par Nicolas Roche il y a presque 4 ans
tests/settings.py | ||
---|---|---|
1 |
import os |
|
2 |
|
|
1 | 3 |
# Add corbo hobo agent |
2 | 4 |
INSTALLED_APPS = ('corbo.hobo_agent', 'hobo.agent.common') + INSTALLED_APPS |
3 | 5 |
|
4 | 6 |
REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = ['rest_framework.authentication.BasicAuthentication'] |
7 |
|
|
8 |
DATABASES = { |
|
9 |
'default': { |
|
10 |
'ENGINE': os.environ.get('DB_ENGINE', 'django.db.backends.sqlite3'), |
|
11 |
'TEST': {'NAME': 'chrono-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-')[:63],}, |
|
12 |
} |
|
13 |
} |
tox.ini | ||
---|---|---|
6 | 6 |
usedevelop = |
7 | 7 |
coverage: True |
8 | 8 |
setenv = |
9 |
DB_ENGINE=django.db.backends.postgresql_psycopg2 |
|
9 | 10 |
DJANGO_SETTINGS_MODULE=corbo.settings |
10 | 11 |
CORBO_SETTINGS_FILE=tests/settings.py |
11 | 12 |
coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov-report html --cov=corbo/ --cov-config .coveragerc |
... | ... | |
23 | 24 |
pylint |
24 | 25 |
astroid |
25 | 26 |
mock |
27 |
psycopg2-binary |
|
26 | 28 |
commands = |
27 | 29 |
py.test {env:COVERAGE:} {posargs:tests/} |
Formats disponibles : Unified diff
tests: run tests using postgres (#45105)