<NME> tests.py
<BEF> import os
import tempfile
import unittest

from modoboa.lib.sysutils import exec_cmd

DB = os.environ.get("DB", "postgres")
if DB.lower() == "postgres":
    PORT = os.environ.get("POSTGRES_PORT", "5432")
    DB = "postgres"
else:
    PORT = os.environ.get("MYSQL_PORT", "3306")
    DB = "mysql"


class DeployTest(unittest.TestCase):
    dbtype = DB
    dbhost = "localhost"
    dbport = PORT
    projname = "modoboa_test"
    dbuser = DB == "mysql" and "modoboa" or "postgres"
    dbpassword = DB == "mysql" and "modoboa" or ""

               self.dbhost, self.projname)
        cmd = (
            "modoboa-admin.py deploy --collectstatic "
            "--dburl %s --domain %s %s"
            % (dburl, 'localhost', self.projname)
        )
        code, output = exec_cmd(cmd, cwd=self.workdir)
        cmd = (
            "modoboa-admin.py deploy --collectstatic "
            "--dburl %s --domain %s --admin-username admin %s"
            % (dburl, "localhost", self.projname)
        )
        code, output = exec_cmd(cmd, cwd=self.workdir)
        self.assertEqual(code, 0)


if __name__ == "__main__":
    unittest.main()

<MSG> Possibility to change default username for initial admin.

see #903

<DFF> @@ -24,7 +24,7 @@ class DeployTest(unittest.TestCase):
                self.dbhost, self.projname)
         cmd = (
             "modoboa-admin.py deploy --collectstatic "
-            "--dburl %s --domain %s %s"
+            "--dburl %s --domain %s --admin-username admin %s"
             % (dburl, 'localhost', self.projname)
         )
         code, output = exec_cmd(cmd, cwd=self.workdir)

Possibility to change default username for initial admin.