diff --git a/.travis.yml b/.travis.yml index 264c8f4..a9ed9ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: python env: - DJANGO_VERSION=1.4 - DJANGO_VERSION=1.5 + - DJANGO_VERSION=1.6 python: - "2.6" - "2.7" diff --git a/test_project/manage.py b/test_project/manage.py index a26e8ac..bc8a0d4 100755 --- a/test_project/manage.py +++ b/test_project/manage.py @@ -1,19 +1,14 @@ #!/usr/bin/env python + import sys import os +from django.core.management import execute_from_command_line + + sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) -from django.core.management import execute_manager -import imp -try: - imp.find_module('settings') # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) - sys.exit(1) - -import settings if __name__ == "__main__": - execute_manager(settings) + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") + execute_from_command_line(sys.argv) diff --git a/test_project/settings.py b/test_project/settings.py index 2ab4a1b..fc40d54 100644 --- a/test_project/settings.py +++ b/test_project/settings.py @@ -6,6 +6,7 @@ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1] ROOT_URLCONF = "%s.urls" % PROJECT_DIRNAME TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),) +TEST_RUNNER = "django.test.simple.DjangoTestSuiteRunner" SECRET_KEY = "hi mom" DATABASES = {