Ticket #5436: test_runner_py24.patch
File test_runner_py24.patch, 1.1 KB (added by , 17 years ago) |
---|
-
django/contrib/gis/tests/__init__.py
17 17 "Builds a test suite for the GIS package." 18 18 s = TestSuite() 19 19 for test_suite in test_suite_names: 20 tsuite = getattr(__import__('django.contrib.gis.tests', fromlist=[test_suite]),test_suite)20 tsuite = getattr(__import__('django.contrib.gis.tests', globals(), locals(), [test_suite]),test_suite) 21 21 s.addTest(tsuite.suite()) 22 22 return s 23 23 … … 69 69 for test_model in test_models: 70 70 module_name = 'django.contrib.gis.tests.%s' % test_model 71 71 settings.INSTALLED_APPS.append(module_name) 72 tsuite = getattr(__import__('django.contrib.gis.tests.%s' % test_model, fromlist=['tests']), 'tests')72 tsuite = getattr(__import__('django.contrib.gis.tests.%s' % test_model, globals(), locals(), ['tests']), 'tests') 73 73 test_suite.addTest(tsuite.suite()) 74 74 75 75 # Resetting the loaded flag to take into account what we appended to the INSTALLED_APPS