<s> import os <EOL> import sys <EOL> import argparse <EOL> from django . conf import settings <EOL> class QuickDjangoTest ( object ) : <EOL> """<STR_LIT>""" <EOL> DIRNAME = os . path . dirname ( __file__ ) <EOL> INSTALLED_APPS = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> self . apps = args <EOL> self . run_tests ( ) <EOL> def run_tests ( self ) : <EOL> """<STR_LIT>""" <EOL> settings . configure ( <EOL> ROOT_URLCONF = '<STR_LIT>' , <EOL> DEBUG = True , <EOL> DATABASES = { <EOL> '<STR_LIT:default>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : os . path . join ( self . DIRNAME , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> } , <EOL> MIDDLEWARE_CLASSES = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) , <EOL> INSTALLED_APPS = self . INSTALLED_APPS + self . apps <EOL> ) <EOL> import django <EOL> if hasattr ( django , '<STR_LIT>' ) : <EOL> django . setup ( ) <EOL> try : <EOL> from django . test . runner import DiscoverRunner <EOL> failures = DiscoverRunner ( ) . run_tests ( self . apps , verbosity = <NUM_LIT:1> ) <EOL> except ImportError : <EOL> from django . test . simple import DjangoTestSuiteRunner <EOL> failures = DjangoTestSuiteRunner ( ) . run_tests ( self . apps , verbosity = <NUM_LIT:1> ) <EOL> if failures : <EOL> sys . exit ( failures ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> """<STR_LIT>""" <EOL> parser = argparse . ArgumentParser ( <EOL> usage = "<STR_LIT>" , <EOL> description = "<STR_LIT>" <EOL> ) <EOL> parser . add_argument ( '<STR_LIT>' , nargs = '<STR_LIT:+>' , type = str ) <EOL> args = parser . parse_args ( ) <EOL> QuickDjangoTest ( * args . apps ) </s>
