mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
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
This commit is contained in:
35
runtests.py
Normal file
35
runtests.py
Normal file
@@ -0,0 +1,35 @@
|
||||
# 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()
|
||||
Reference in New Issue
Block a user