forked from johnboxall/django-paypal
-
Notifications
You must be signed in to change notification settings - Fork 206
/
runtests.py
executable file
·42 lines (34 loc) · 1.27 KB
/
runtests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env python
import sys
import getpass
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
ROOT_URLCONF='',
DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3'}},
PAYPAL_RECEIVER_EMAIL='[email protected]',
PAYPAL_TEST=True,
# Please dont make me create another test account and remove this from here :)
PAYPAL_WPP_USER='dcrame_1278645792_biz_api1.gmail.com',
PAYPAL_WPP_PASSWORD='1278645801',
PAYPAL_WPP_SIGNATURE='A4k1.O6xTyld5TiKeVmCuOgqzLRuAKuTtSG.7BD3R9E8SBa-J0pbUeYp',
INSTALLED_APPS=[
'django.contrib.auth',
'django.contrib.contenttypes',
'paypal.pro',
'paypal.standard',
'paypal.standard.ipn',
# 'paypal.standard.pdt', # we need the PDT token
]
)
from django.test.simple import DjangoTestSuiteRunner
def runtests(*test_args):
if not test_args:
test_args = ['pro', 'standard', 'ipn']
parent = dirname(abspath(__file__))
sys.path.insert(0, parent)
failures = DjangoTestSuiteRunner().run_tests(test_args, verbosity=1, interactive=True)
sys.exit(bool(failures))
if __name__ == '__main__':
runtests(*sys.argv[1:])