diff --git a/example_project/settings.py b/example_project/settings.py index 1af8640..c1b3ce3 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -48,7 +48,7 @@ ALLOWED_HOSTS = [] # Mailman API credentials -MAILMAN_REST_API_URL = 'http://localhost:9001' +MAILMAN_REST_API_URL = 'http://localhost:8001' MAILMAN_REST_API_USER = 'restadmin' MAILMAN_REST_API_PASS = 'restpass' diff --git a/example_project/test_settings.py b/example_project/test_settings.py new file mode 100644 index 0000000..8f08d9a --- /dev/null +++ b/example_project/test_settings.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 1998-2016 by the Free Software Foundation, Inc. +# +# This file is part of Postorius. +# +# Postorius is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# Postorius is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# Postorius. If not, see . + +""" +Django test settings for postorius project. +""" + +from settings import * + +# Mailman API credentials for testing +MAILMAN_REST_API_URL = 'http://localhost:9001' +MAILMAN_REST_API_USER = 'restadmin' +MAILMAN_REST_API_PASS = 'restpass' diff --git a/tox.ini b/tox.ini index 99226d3..f86115c 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ django19: Django>=1.9,<1.10a django-latest: https://github.com/django/django/archive/master.tar.gz commands = - coverage run example_project/manage.py test {posargs:postorius} + coverage run example_project/manage.py test --settings=test_settings {posargs:postorius} coverage report setenv = PYTHONPATH = {toxinidir} @@ -30,7 +30,7 @@ PYTHONPATH = {toxinidir} POSTORIUS_VCR_RECORD_MODE = all commands = - python example_project/manage.py test {posargs:postorius} + python example_project/manage.py test --settings=test_settings {posargs:postorius} # These are used for local development and expect mailman.client to be @@ -46,7 +46,7 @@ commands = # Install mailmanclient from local repo instead of from pypi pip install -e ../mailmanclient - python example_project/manage.py test {posargs:postorius} + python example_project/manage.py test --settings=test_settings {posargs:postorius} [testenv:dev-record] usedevelop = True @@ -60,7 +60,7 @@ commands = # Install mailmanclient from local repo instead of from pypi pip install -e ../mailmanclient - python example_project/manage.py test {posargs:postorius} + python example_project/manage.py test --settings=test_settings {posargs:postorius} [testenv:pep8] basepython = python2.7