django-extras /

Tim Savage ca5df31 

Tim Savage ace7337 
Tim Savage ca5df31 

Tim Savage 955d813 
Tim Savage ca5df31 

Tim Savage 97f364c 
Tim Savage ca5df31 

# Helper test runner for running tests against django_extras
import os

from optparse import OptionParser

from django.conf import settings
from import call_command

def main():
    parser = OptionParser()
    parser.add_option('--DATABASE_ENGINE', dest='DATABASE_ENGINE', default='django.db.backends.sqlite3')
    parser.add_option('--DATABASE_NAME',   dest='DATABASE_NAME',   default='test.db')
    parser.add_option('--DATABASE_USER',   dest='DATABASE_USER',   default='')
    parser.add_option('--DATABASE_PASSWORD', dest='DATABASE_PASSWORD', default='')
    parser.add_option('--DATABASE_HOST',   dest='DATABASE_HOST',   default='')
    parser.add_option('--DATABASE_PORT',   dest='DATABASE_PORT',  default='')
    parser.add_option('--SITE_ID',         dest='SITE_ID', type='int', default=1)

    options, args = parser.parse_args()

        'DATABASES': {
            'default': {
                'ENGINE': options.DATABASE_ENGINE,
                'NAME': options.DATABASE_NAME,
                'USER': options.DATABASE_USER,
                'PASSWORD': options.DATABASE_PASSWORD,
                'HOST': options.DATABASE_HOST,
                'PORT': options.DATABASE_PORT,
        'SITE_ID': options.SITE_ID,
        'ROOT_URLCONF': '',
        'TEMPLATE_DIRS': (
            os.path.join(os.path.dirname(__file__), 'templates'),
        'INSTALLED_APPS': (

    call_command('test', 'django_extras')

if __name__ == '__main__':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.