2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

Add CI tests for MySQL database

This commit is contained in:
Oliver Walters
2020-09-01 21:01:38 +10:00
parent c3c5a86ea5
commit 55c1ea750c
3 changed files with 47 additions and 4 deletions

View File

@ -0,0 +1,18 @@
"""
Configuration file for running tests against a MySQL database.
"""
from InvenTree.settings import *
# Override the 'test' database
if 'test' in sys.argv:
eprint('InvenTree: Running tests - Using MySQL test database')
DATABASES['default'] = {
# Ensure mysql backend is being used
'ENGINE': 'django.db.backends.mysql',
'NAME': 'inventree_test_db',
'USER': 'travis',
'PASSWORD': '',
'HOST': '127.0.0.1'
}