tests: run tests using postgres (#45105)
This commit is contained in:
parent
fbc224a625
commit
e365818a35
|
@ -1,4 +1,13 @@
|
|||
import os
|
||||
|
||||
# Add corbo hobo agent
|
||||
INSTALLED_APPS = ('corbo.hobo_agent', 'hobo.agent.common') + INSTALLED_APPS
|
||||
|
||||
REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = ['rest_framework.authentication.BasicAuthentication']
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': os.environ.get('DB_ENGINE', 'django.db.backends.sqlite3'),
|
||||
'TEST': {'NAME': 'chrono-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-')[:63],},
|
||||
}
|
||||
}
|
||||
|
|
2
tox.ini
2
tox.ini
|
@ -6,6 +6,7 @@ envlist = py2-coverage-django111,py3-django111,py3-django22
|
|||
usedevelop =
|
||||
coverage: True
|
||||
setenv =
|
||||
DB_ENGINE=django.db.backends.postgresql_psycopg2
|
||||
DJANGO_SETTINGS_MODULE=corbo.settings
|
||||
CORBO_SETTINGS_FILE=tests/settings.py
|
||||
coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov-report html --cov=corbo/ --cov-config .coveragerc
|
||||
|
@ -23,5 +24,6 @@ deps =
|
|||
pylint
|
||||
astroid
|
||||
mock
|
||||
psycopg2-binary
|
||||
commands =
|
||||
py.test {env:COVERAGE:} {posargs:tests/}
|
||||
|
|
Reference in New Issue