mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Remove useless runner.
This commit is contained in:
@@ -6,46 +6,6 @@ import tempfile
|
||||
from .sysutils import exec_cmd
|
||||
|
||||
|
||||
class TestRunnerMixin(object):
|
||||
|
||||
"""A test runner for extensions (travis only)."""
|
||||
|
||||
dbtype = "postgres"
|
||||
dbhost = "localhost"
|
||||
projname = "modoboa_test"
|
||||
dbuser = "postgres"
|
||||
dbpassword = ""
|
||||
|
||||
dependencies = []
|
||||
|
||||
def setUp(self):
|
||||
"""Test setup."""
|
||||
self.workdir = tempfile.mkdtemp()
|
||||
|
||||
def test(self):
|
||||
"""Run extensions tests."""
|
||||
dburl = "default:{0}://{1}:{2}@{3}/{4}".format(
|
||||
self.dbtype, self.dbuser, self.dbpassword, self.dbhost,
|
||||
self.projname
|
||||
)
|
||||
cmd = (
|
||||
"modoboa-admin.py deploy --collectstatic "
|
||||
"--dburl {0} --extensions {1} --dont-install-extensions "
|
||||
"--domain {2} {3}"
|
||||
.format(
|
||||
dburl, " ".join(self.dependencies + [self.extension]),
|
||||
"localhost", self.projname
|
||||
)
|
||||
)
|
||||
code, output = exec_cmd(cmd, cwd=self.workdir)
|
||||
self.assertEqual(code, 0)
|
||||
|
||||
path = os.path.join(self.workdir, self.projname)
|
||||
cmd = "python manage.py test {0}.tests".format(self.extension)
|
||||
code, output = exec_cmd(cmd, capture_output=False, cwd=path)
|
||||
self.assertEqual(code, 0)
|
||||
|
||||
|
||||
class MapFilesTestCaseMixin(object):
|
||||
|
||||
"""A generic test case to check map files generation."""
|
||||
|
||||
Reference in New Issue
Block a user