mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
Adding tests.
This commit is contained in:
parent
19f64256b6
commit
0eb63b44cf
6 changed files with 162 additions and 2 deletions
36
django_mailbox/runtests.py
Normal file
36
django_mailbox/runtests.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python
|
||||
import sys
|
||||
|
||||
from os.path import dirname, abspath
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
if not settings.configured:
|
||||
settings.configure(
|
||||
DATABASES={
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
},
|
||||
},
|
||||
INSTALLED_APPS=[
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django_mailbox',
|
||||
]
|
||||
)
|
||||
|
||||
from django.test.simple import DjangoTestSuiteRunner
|
||||
|
||||
|
||||
def runtests(*test_args):
|
||||
if not test_args:
|
||||
test_args = ['django_mailbox']
|
||||
parent = dirname(abspath(__file__))
|
||||
sys.path.insert(0, parent)
|
||||
runner = DjangoTestSuiteRunner(verbosity=1, interactive=True)
|
||||
failures = runner.run_tests(test_args)
|
||||
sys.exit(failures)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
runtests(*sys.argv[1:])
|
||||
Loading…
Add table
Add a link
Reference in a new issue