def _tests_old(self):
"""
Fire up the Django test suite from before version 1.2
"""
test_settings = self.custom_settings
installed_apps = test_settings.pop('INSTALLED_APPS', ())
settings.configure(
DEBUG=True,
DATABASE_ENGINE='sqlite3',
DATABASE_NAME=os.path.join(self.DIRNAME, 'database.db'),
INSTALLED_APPS=tuple(self.INSTALLED_APPS + installed_apps + self.apps),
**test_settings
)
from django.test.simple import run_tests
failures = run_tests(self.apps, verbosity=1)
if failures:
sys.exit(failures)
评论列表
文章目录