Ticket #582: template_eggs-runtests.patch
File template_eggs-runtests.patch, 1.3 KB (added by , 19 years ago) |
---|
-
tests/runtests.py
7 7 # and Django aims to work with Python 2.3+. 8 8 import doctest 9 9 10 APP_NAME = 'testapp' 10 TEST_APPS = ('testapp', 'omelet') 11 11 OTHER_TESTS_DIR = "othertests" 12 12 TEST_DATABASE_NAME = 'django_test_db' 13 13 … … 18 18 'description': description, 19 19 }) 20 20 21 MODEL_DIR = os.path.join(os.path.dirname(__file__), APP_NAME, 'models')21 MODEL_DIR = os.path.join(os.path.dirname(__file__), TEST_APPS[0], 'models') 22 22 23 23 def get_test_models(): 24 24 return [f[:-3] for f in os.listdir(MODEL_DIR) if f.endswith('.py') and not f.startswith('__init__')] … … 68 68 from django.core import management, meta 69 69 70 70 # Manually set INSTALLED_APPS to point to the test app. 71 settings.INSTALLED_APPS = (APP_NAME,)71 settings.INSTALLED_APPS = TEST_APPS 72 72 73 73 # Determine which models we're going to test. 74 74 test_models = get_test_models() … … 212 212 verbosity_level = int(options.v) 213 213 if options.settings: 214 214 os.environ['DJANGO_SETTINGS_MODULE'] = options.settings 215 sys.path.append(os.path.abspath('omelet.egg')) 215 216 t = TestRunner(verbosity_level, args) 216 217 t.run_tests()