Update test env to Django 1.6
This commit is contained in:
@@ -2,6 +2,7 @@ language: python
|
|||||||
env:
|
env:
|
||||||
- DJANGO_VERSION=1.4
|
- DJANGO_VERSION=1.4
|
||||||
- DJANGO_VERSION=1.5
|
- DJANGO_VERSION=1.5
|
||||||
|
- DJANGO_VERSION=1.6
|
||||||
python:
|
python:
|
||||||
- "2.6"
|
- "2.6"
|
||||||
- "2.7"
|
- "2.7"
|
||||||
|
|||||||
@@ -1,19 +1,14 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from django.core.management import execute_from_command_line
|
||||||
|
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
|
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__":
|
if __name__ == "__main__":
|
||||||
execute_manager(settings)
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
|
||||||
|
execute_from_command_line(sys.argv)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
|
|||||||
PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1]
|
PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1]
|
||||||
ROOT_URLCONF = "%s.urls" % PROJECT_DIRNAME
|
ROOT_URLCONF = "%s.urls" % PROJECT_DIRNAME
|
||||||
TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),)
|
TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),)
|
||||||
|
TEST_RUNNER = "django.test.simple.DjangoTestSuiteRunner"
|
||||||
SECRET_KEY = "hi mom"
|
SECRET_KEY = "hi mom"
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
|
|||||||
Reference in New Issue
Block a user