forked from dcramer/django-paypal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added standalone unit test runner. Fixed test_doDirectPayment_invalid…
… logic.
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/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( | ||
DATABASE_ENGINE='sqlite3', | ||
PAYPAL_RECEIVER_EMAIL='%s@localhost' % (getpass.getuser(),), | ||
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=[ | ||
'paypal.pro', | ||
'paypal.standard', | ||
] | ||
) | ||
|
||
from django.test.simple import run_tests | ||
|
||
|
||
def runtests(*test_args): | ||
if not test_args: | ||
test_args = ['pro', 'standard'] | ||
parent = dirname(abspath(__file__)) | ||
sys.path.insert(0, parent) | ||
failures = run_tests(test_args, verbosity=1, interactive=True) | ||
sys.exit(failures) | ||
|
||
|
||
if __name__ == '__main__': | ||
runtests(*sys.argv[1:]) |