Skip to content
This repository
Browse code

Django 1.5 support

  • Loading branch information...
commit 1598d8709e30685c692a7173b33a082a1cf96388 1 parent f6ce8c1
Andreas Pelme authored December 17, 2012
6  .travis.yml
@@ -11,16 +11,20 @@ python:
11 11
 env:
12 12
   - DB=sqlite DJANGO_VERSION=1.3.1 PSYCOPG_VERSION=2.4.1
13 13
   - DB=sqlite DJANGO_VERSION=1.4 PSYCOPG_VERSION=2.4.5
  14
+  - DB=sqlite DJANGO_VERSION=1.5b2 PSYCOPG_VERSION=2.4.5
14 15
 
15 16
   - DB=mysql DJANGO_VERSION=1.3.1 PSYCOPG_VERSION=2.4.1
16 17
   - DB=mysql DJANGO_VERSION=1.4 PSYCOPG_VERSION=2.4.5
  18
+  - DB=mysql DJANGO_VERSION=1.5b2 PSYCOPG_VERSION=2.4.5
17 19
 
18 20
   - DB=postgres DJANGO_VERSION=1.3.1 PSYCOPG_VERSION=2.4.1
19 21
   - DB=postgres DJANGO_VERSION=1.4 PSYCOPG_VERSION=2.4.5
  22
+  - DB=postgres DJANGO_VERSION=1.5b2 PSYCOPG_VERSION=2.4.5
20 23
 
21 24
 install:
22 25
   - pip install --use-mirrors pytest 
23  
-  - pip install --use-mirrors django==$DJANGO_VERSION
  26
+  - [ if "DJANGO_VERSION" != "1.5b2" ] pip install --use-mirrors django==$DJANGO_VERSION
  27
+  - [ if "DJANGO_VERSION" == "1.5b2" ] pip install https://www.djangoproject.com/download/1.5b2/tarball/#egg=django
24 28
   - if [ "$TRAVIS_PYTHON_VERSION" == "pypy" -a "$DB" == postgres ]; then pip install psycopg2ct --use-mirrors; fi
25 29
   - if [ "$TRAVIS_PYTHON_VERSION" != "pypy" -a "$DB" == postgres ]; then pip install psycopg2==$PSYCOPG_VERSION --use-mirrors; fi
26 30
   - if [ "$DB" == mysql ]; then pip install mysql-python --use-mirrors; fi
5  pytest_django/db_reuse.py
@@ -50,7 +50,10 @@ def create_test_db(self, verbosity=1, autoclobber=False):
50 50
         print "Re-using existing test database for alias '%s'%s..." % (
51 51
             self.connection.alias, test_db_repr)
52 52
 
53  
-    self.connection.features.confirm()
  53
+    # confirm() is not needed/available in Django >= 1.5
  54
+    # See https://code.djangoproject.com/ticket/17760
  55
+    if hasattr(self.connection.features, 'confirm'):
  56
+        self.connection.features.confirm()
54 57
 
55 58
     return test_database_name
56 59
 
2  tests/conftest.py
@@ -41,7 +41,7 @@ def django_testdir(testdir, monkeypatch):
41 41
 INSTALLED_APPS = [
42 42
     'tpkg.app',
43 43
 ]
44  
-
  44
+SECRET_KEY = 'foobar'
45 45
 ''' % {'db_settings': repr(db_settings)}
46 46
 
47 47
     tpkg_path = testdir.mkpydir('tpkg')
1  tests/test_django_settings_module.py
@@ -11,6 +11,7 @@
11 11
         'NAME': ':memory:'
12 12
     },
13 13
 }
  14
+SECRET_KEY = 'foobar'
14 15
 '''
15 16
 
16 17
 

0 notes on commit 1598d87

Please sign in to comment.
Something went wrong with that request. Please try again.