mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Fix tests runner with django 1.6
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ python:
|
||||
- "2.7"
|
||||
|
||||
env:
|
||||
- DJANGO=1.5
|
||||
- DJANGO=1.6
|
||||
|
||||
install:
|
||||
- pip install -q Django==$DJANGO --use-mirrors
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<script type="text/javascript" src="{% static 'moment/min/moment.min.js' %}"></script>
|
||||
<script src="{% static 'eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js' %}" type="text/javascript"></script>
|
||||
<script src="{% static 'bootstrap-select/dist/js/bootstrap-select.min.js' %}" type="text/javascript"></script>
|
||||
{% if LANGUAGE_CODE != "en" %}<script src="{{ STATIC_URL }}moment/locale/{{ LANGUAGE_CODE }}.js %}" type="text/javascript"></script>{% endif %}
|
||||
{% if LANGUAGE_CODE != "en" %}<script src="{{ STATIC_URL }}moment/locale/{{ LANGUAGE_CODE }}.js" type="text/javascript"></script>{% endif %}
|
||||
{% if TEMPLATE_DEBUG %}
|
||||
<script src="//maxcdn.bootstrapcdn.com/bootlint/0.4.0/bootlint.min.js"></script>
|
||||
{% endif %}
|
||||
|
||||
@@ -18,21 +18,25 @@ class DeployTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.workdir = tempfile.mkdtemp()
|
||||
|
||||
def tearDown(self):
|
||||
def tearDown(self):
|
||||
path = os.path.join(self.workdir, self.projname)
|
||||
code, output = exec_cmd(
|
||||
"python manage.py test core lib admin limits postfix_relay_domains"
|
||||
" radicale postfix_autoreply",
|
||||
capture_output=False,
|
||||
cwd=path
|
||||
extensions = [
|
||||
"core", "lib", "admin", "limits", "postfix_relay_domains",
|
||||
"radicale", "postfix_autoreply"
|
||||
]
|
||||
cmd = "python manage.py test {0}".format(
|
||||
["modoboa.extensions.{0}".format(extension)
|
||||
for extension in extensions]
|
||||
)
|
||||
code, output = exec_cmd(cmd, capture_output=False, cwd=path)
|
||||
self.assertEqual(code, 0)
|
||||
|
||||
def test_standard(self):
|
||||
timeout = 2
|
||||
cmd = "modoboa-admin.py deploy --syncdb --collectstatic %s" % self.projname
|
||||
cmd = "modoboa-admin.py deploy --syncdb --collectstatic {0}".format(
|
||||
self.projname)
|
||||
child = pexpect.spawn(cmd, cwd=self.workdir)
|
||||
fout = open('install_from_scratch.log','w')
|
||||
fout = open('install_from_scratch.log', 'w')
|
||||
child.logfile = fout
|
||||
child.expect("Database type \(mysql, postgres or sqlite3\):", timeout=timeout)
|
||||
child.sendline(self.dbtype)
|
||||
|
||||
Reference in New Issue
Block a user