Files
django-anymail/runtests.py
medmunds 1bec172611 Testing on backend API calls, using mock; add runtests.py.
Cherry-picked from:
8c26807a - Add runtests.py for testing separately from other Django apps
cd8504b1 - Make tests compatible with setuptools
4ac65b78 - Set up testing on the backend API calls, using mock
2012-10-31 18:15:54 -07:00

36 lines
698 B
Python

# python setup.py test
# or
# python runtests.py
import sys
from django.conf import settings
APP='djrill'
settings.configure(
DEBUG=True,
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
ROOT_URLCONF=APP+'.urls',
INSTALLED_APPS=(
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
APP,
)
)
from django.test.simple import DjangoTestSuiteRunner
def runtests():
test_runner = DjangoTestSuiteRunner(verbosity=1)
failures = test_runner.run_tests([APP, ])
sys.exit(failures)
if __name__ == '__main__':
runtests()