コード例 #1
0
def main():
    settings = {
        "INSTALLED_APPS": (
            "django.contrib.auth",
            "d51.django.apps.email_capture",
        ),
    }
    run_tests(settings, 'email_capture')
コード例 #2
0
def main():
    settings = {
        "INSTALLED_APPS": (
            "d51.django.apps.twitter",
        ),
        'ROOT_URLCONF': '__main__',
    }
    run_tests(settings, 'twitter')
コード例 #3
0
def main():
    settings = {
        "INSTALLED_APPS": (
            "d51.django.apps.invites",
            "django.contrib.auth",
            "django.contrib.contenttypes",
        ),
    }
    run_tests(settings, 'invites')
コード例 #4
0
def main():
    settings = {
        "INSTALLED_APPS": (
            "d51.django.apps.logger",
        ),
        # Make this the urls.py and include the necessary patterns here
        'ROOT_URLCONF': '__main__',
    }
    run_tests(settings, 'logger')
コード例 #5
0
def main():
    settings = {
        "INSTALLED_APPS": (
            "django.contrib.contenttypes",
            "d51.django.apps.blogs",
        ),
        'ROOT_URLCONF': '__main__',
    }
    run_tests(settings, 'blogs')
コード例 #6
0
def main():
    settings = {
        "INSTALLED_APPS": (
            "django.contrib.contenttypes",
            "d51.django.apps.regions",
        ),
        'DATABASE_ENGINE': 'postgresql_psycopg2',
        'DATABASE_NAME': 'd51_django_apps_regions',
        'TEST_RUNNER': 'django.contrib.gis.tests.run_tests',
    }
    run_tests(settings, 'regions')
コード例 #7
0
def main():
    # Check to see that ~/.d51.django.auth.test.settings file is available
    settings_file = os.path.join(os.environ['HOME'], '.d51.django.auth.test.settings')
    if not os.path.exists(settings_file):
        print """
Please create a ~/.d51.django.auth.test.settings config file with the following
in it (be sure to fill in your settings).  You must register your own Twitter
oauth client to run these tests:

[settings]
TWITTER_CONSUMER_KEY = <your consumer key>
TWITTER_CONSUMER_SECRET = <your consumer secret>

""".lstrip()
        sys.exit(1)

    config = ConfigParser.RawConfigParser()
    config.read(settings_file)

    settings = {
        "INSTALLED_APPS": (
            'django.contrib.contenttypes',
            'django.contrib.sessions',
            'd51.django.auth',
            'd51.django.auth.facebook',
            'd51.django.auth.twitter',
        ),

        # Make this the urls.py and include the necessary patterns here
        'ROOT_URLCONF': '__main__',

        # Necessary configuration for d51.django.auth
        'D51_DJANGO_AUTH': {
            'TWITTER_CONSUMER_KEY': config.get('settings', 'TWITTER_CONSUMER_KEY'),
            'TWITTER_CONSUMER_SECRET': config.get('settings', 'TWITTER_CONSUMER_SECRET'),
        },

    }
    run_tests(settings, 'auth')