<NME> runtests.py
<BEF> #!/usr/bin/env python

import argparse
import sys
import warnings

from django.conf import settings
from django.core.management import execute_from_command_line

warnings.simplefilter("always", PendingDeprecationWarning)
warnings.simplefilter("always", DeprecationWarning)


parser = argparse.ArgumentParser(description="Run the test suite, or specific tests specified using dotted paths.")
parser.add_argument(
    "--use-tz",
    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
    ],
    CACHES={
        'default': {
    # Please dont make me create another test account and remove this from here :)
    PAYPAL_WPP_USER="django.paypal.seller_api1.gmail.com",
    PAYPAL_WPP_PASSWORD="D5LBCTEKUUJR8EKL",
    PAYPAL_WPP_SIGNATURE="AFcWxV21C7fd0v3bYYYRCpSSRl31A6nHqN3IBok0TF-H8I-C8C6u41Do",
    PAYPAL_IDENTITY_TOKEN="xxx",
    INSTALLED_APPS=[
        "django.contrib.auth",
        "django.contrib.admin",
        "django.contrib.messages",
        "django.contrib.sessions",
        "django.contrib.contenttypes",
        "paypal.pro",
if len(sys.argv) == 1:
    # Nothing following 'runtests.py':
    if django.VERSION < (1,6):
        argv.extend(["pro", "ipn"])
    else:
        argv.extend(["paypal.pro.tests", "paypal.standard.ipn.tests"])
else:
    # Allow tests to be specified:
    argv.extend(sys.argv[1:])
        }
    },
    MIDDLEWARE=[
        "django.contrib.sessions.middleware.SessionMiddleware",
        "django.middleware.common.CommonMiddleware",
        "django.middleware.csrf.CsrfViewMiddleware",
        "django.contrib.auth.middleware.AuthenticationMiddleware",
        "django.contrib.messages.middleware.MessageMiddleware",
        "django.middleware.clickjacking.XFrameOptionsMiddleware",
    ],
    TEMPLATES=[
        {
            "BACKEND": "django.template.backends.django.DjangoTemplates",
            "DIRS": [],
            "APP_DIRS": True,
            "OPTIONS": {
                "context_processors": [
                    "django.contrib.auth.context_processors.auth",
                    "django.template.context_processors.debug",
                    "django.template.context_processors.i18n",
                    "django.template.context_processors.media",
                    "django.template.context_processors.request",
                    "django.template.context_processors.static",
                    "django.template.context_processors.tz",
                    "django.contrib.messages.context_processors.messages",
                ],
            },
        },
    ],
    USE_TZ=not (known_args.use_tz == "false"),
    LOGGING={
        "version": 1,
        "disable_existing_loggers": True,
        "root": {
            "level": "WARNING",
            "handlers": ["console"],
        },
        "handlers": {
            "console": {
                "level": "WARNING",
                "class": "logging.StreamHandler",
            },
        },
    },
    SECRET_KEY="required_by_django",
    DEFAULT_AUTO_FIELD="django.db.models.BigAutoField",
)

settings.configure(**settings_dict)


if len(test_args) == 0:
    test_args = [
        "paypal.pro.tests",
        "paypal.standard.ipn.tests",
        "paypal.standard.pdt.tests",
    ]

argv = [sys.argv[0], "test"] + remaining_options + test_args

if __name__ == "__main__":
    execute_from_command_line(argv)

<MSG> Got PDT tests working

<DFF> @@ -17,13 +17,14 @@ settings.configure(
     PAYPAL_WPP_USER='dcrame_1278645792_biz_api1.gmail.com',
     PAYPAL_WPP_PASSWORD='1278645801',
     PAYPAL_WPP_SIGNATURE='A4k1.O6xTyld5TiKeVmCuOgqzLRuAKuTtSG.7BD3R9E8SBa-J0pbUeYp',
+    PAYPAL_IDENTITY_TOKEN='xxx',
     INSTALLED_APPS=[
         'django.contrib.auth',
         'django.contrib.contenttypes',
         'paypal.pro',
         'paypal.standard',
         'paypal.standard.ipn',
-        # 'paypal.standard.pdt', # we need the PDT token
+        'paypal.standard.pdt',
     ],
     CACHES={
         'default': {
@@ -42,9 +43,9 @@ argv = [sys.argv[0], "test"]
 if len(sys.argv) == 1:
     # Nothing following 'runtests.py':
     if django.VERSION < (1,6):
-        argv.extend(["pro", "ipn"])
+        argv.extend(["pro", "ipn", "pdt"])
     else:
-        argv.extend(["paypal.pro.tests", "paypal.standard.ipn.tests"])
+        argv.extend(["paypal.pro.tests", "paypal.standard.ipn.tests", "paypal.standard.pdt.tests"])
 else:
     # Allow tests to be specified:
     argv.extend(sys.argv[1:])

{'addition_count': 4, 'commit_subject': 'Got PDT tests working', 'deletion_count': 3, 'file_extension': '.py', 'lang': 'py', 'license': 'mit', 'repo_name': 'spookylukey/django-paypal'}