<s> import sys <EOL> import django <EOL> from django . conf import settings <EOL> APP_NAME = '<STR_LIT>' <EOL> if django . VERSION < ( <NUM_LIT:1> , <NUM_LIT:8> ) : <EOL> comments = '<STR_LIT>' <EOL> else : <EOL> comments = '<STR_LIT>' <EOL> settings . configure ( <EOL> DEBUG = True , <EOL> DATABASES = { <EOL> '<STR_LIT:default>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> } , <EOL> USE_TZ = True , <EOL> ROOT_URLCONF = '<STR_LIT>' . format ( APP_NAME ) , <EOL> MIDDLEWARE_CLASSES = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ) , <EOL> SITE_ID = <NUM_LIT:1> , <EOL> HOOK_EVENTS = { } , <EOL> HOOK_THREADING = False , <EOL> INSTALLED_APPS = ( <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> comments , <EOL> APP_NAME , <EOL> ) , <EOL> ) <EOL> from django . test . utils import get_runner <EOL> if hasattr ( django , '<STR_LIT>' ) : <EOL> django . setup ( ) <EOL> TestRunner = get_runner ( settings ) <EOL> test_runner = TestRunner ( ) <EOL> failures = test_runner . run_tests ( [ APP_NAME ] ) <EOL> if failures : <EOL> sys . exit ( failures ) </s>
