<NME> tox.ini
<BEF> ADDFILE
<MSG> Merge pull request #912 from bearstech/tox

allow to use tox to run tests/serve locally in an easy way
<DFF> @@ -0,0 +1,25 @@
+[tox]
+envlist = py27
+
+[testenv]
+changedir=test_project
+commands =
+    python ../tests.py
+    coverage run --source ../modoboa manage.py test modoboa.core modoboa.lib modoboa.admin.tests modoboa.limits modoboa.relaydomains
+deps =
+    -r{toxinidir}/test-requirements.txt
+    coverage
+setenv =
+    DB=SQLITE
+
+[testenv:serve]
+changedir=test_project
+commands =
+    python manage.py migrate --no-input
+    python manage.py load_initial_data
+    python -c "import django; django.setup(); from modoboa.admin.factories import populate_database; populate_database()"
+    python manage.py runserver
+setenv =
+    DJANGO_SETTINGS_MODULE=test_project.settings
+    DB=SQLITE
+    DEBUG=1

Merge pull request #912 from bearstech/tox