run tests with mysql

This commit is contained in:
Gael Pasgrimaud
2016-03-07 14:54:52 +01:00
parent 7e715c131d
commit 6b6e16d073
3 changed files with 48 additions and 19 deletions
+6 -4
View File
@@ -1,17 +1,19 @@
# coding: utf-8
import os
import tempfile
import unittest
from modoboa.lib.sysutils import exec_cmd
DB = os.environ.get("DB", "postgres")
class DeployTest(unittest.TestCase):
dbtype = "postgres"
dbtype = DB.lower()
dbhost = "localhost"
projname = "modoboa_test"
dbuser = "postgres"
dbpassword = ""
dbuser = DB == "MYSQL" and "modoboa" or "postgres"
dbpassword = DB == "MYSQL" and "modoboa" or ""
def setUp(self):
self.workdir = tempfile.mkdtemp()