Commits

Carl Meyer committed 437ce39

Updated tests to run only on Django 1.3+, and without any deprecations warnings.

Comments (0)

Files changed (6)

 tip (unreleased)
 ----------------
 
+- Django versions prior to 1.3 are no longer tested or supported.
+
 0.5.1 (2011.03.22)
 ------------------
 
 Dependencies
 ------------
 
-``django-adminfiles`` requires `Django`_ 1.1 or later,
+``django-adminfiles`` requires `Django`_ 1.3 or later,
 `sorl-thumbnail`_ 3.2.5 (not compatible with the rewritten 10.x/11.x series)
 and the `Python Imaging Library`_.
 

adminfiles/templates/adminfiles/uploader/base.html

 {% extends "admin/base.html" %}
+{% load url from future %}
 {% load thumbnail %}
 {% load i18n %}
 {% block extrastyle %}
   </li>
   {% endfor %}
   <li class="upload">
-    <a href="{% url admin:adminfiles_fileupload_add %}" class="addlink" id="add_id_uploads" onclick="return showAddUploadPopup(this);">{% trans "Upload" %}</a>
+    <a href="{% url "admin:adminfiles_fileupload_add" %}" class="addlink" id="add_id_uploads" onclick="return showAddUploadPopup(this);">{% trans "Upload" %}</a>
   </li>
   <li>
     <a id="refresh" href="#"><img src="{{ADMINFILES_MEDIA_URL}}adminfiles/icon_refreshlink.gif" /> {% trans "Refresh" %}</a>
              {% endfor %}
 	     {% endifequal %}
            </ul>
-           <a href="{% url admin:adminfiles_fileupload_delete f.id %}" class="deletelink" id="ddd" onclick="return showEditPopup(this);">{% trans "Delete" %}</a>
-           <a href="{% url admin:adminfiles_fileupload_change f.id %}" class="changelink" id="eee" onclick="return showEditPopup(this);">{% trans "Change" %}</a>
+           <a href="{% url "admin:adminfiles_fileupload_delete" f.id %}" class="deletelink" id="ddd" onclick="return showEditPopup(this);">{% trans "Delete" %}</a>
+           <a href="{% url "admin:adminfiles_fileupload_change" f.id %}" class="changelink" id="eee" onclick="return showEditPopup(this);">{% trans "Change" %}</a>
        </div>
        <div class="upload-title">{{f.title}}<br />
          <small>{{f.upload_date|date:"F j, Y"}}</small><br />
 
 os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'
 
-from django.test.simple import run_tests
-
 def runtests():
-    failures = run_tests(['tests'], verbosity=1, interactive=True)
+    from django.test.simple import DjangoTestSuiteRunner
+    runner = DjangoTestSuiteRunner(
+        verbosity=1, interactive=True, failfast=False)
+    failures = runner.run_tests(['tests'])
     sys.exit(failures)
 
 if __name__ == '__main__':

tests/test_settings.py

                   'django.contrib.auth',
                   'django.contrib.sessions',
                   'sorl.thumbnail')
-DATABASE_ENGINE = 'sqlite3'
+DATABASES = {
+    "default": {
+        "ENGINE": "django.db.backends.sqlite3",
+        }
+    }
 
 SITE_ID = 1
 
 [tox]
-envlist=py24-1.1,py24,py24-trunk,py25-1.1,py25,py25-trunk,py26-1.1,py26,py26-trunk,py27-1.1,py27,py27-trunk
+envlist=py25,py25-trunk,py26,py26-trunk,py27,py27-trunk
 
 [testenv]
 deps=
-  django==1.2.3
+  django==1.3.1
   sorl-thumbnail==3.2.5
   PIL==1.1.7
 commands=python setup.py test
 
-[testenv:py24]
-deps=
-  django==1.2.3
-  sorl-thumbnail==3.2.5
-  PIL==1.1.7
-  pysqlite==2.6.0
-
-[testenv:py24-1.1]
-basepython=python2.4
-deps=
-  django==1.1.2
-  sorl-thumbnail==3.2.5
-  PIL==1.1.7
-  pysqlite==2.6.0
-
-[testenv:py24-trunk]
-basepython=python2.4
-deps=
-  svn+http://code.djangoproject.com/svn/django/trunk#egg=django
-  sorl-thumbnail==3.2.5
-  PIL==1.1.7
-  pysqlite==2.6.0
-
-[testenv:py25-1.1]
-basepython=python2.5
-deps=
-  django==1.1.2
-  sorl-thumbnail==3.2.5
-  PIL==1.1.7
-
 [testenv:py25-trunk]
 basepython=python2.5
 deps=
-  svn+http://code.djangoproject.com/svn/django/trunk#egg=django
-  sorl-thumbnail==3.2.5
-  PIL==1.1.7
-
-[testenv:py26-1.1]
-basepython=python2.5
-deps=
-  django==1.1.2
+  https://github.com/django/django/tarball/master
   sorl-thumbnail==3.2.5
   PIL==1.1.7
 
 [testenv:py26-trunk]
 basepython=python2.5
 deps=
-  svn+http://code.djangoproject.com/svn/django/trunk#egg=django
-  sorl-thumbnail==3.2.5
-  PIL==1.1.7
-
-[testenv:py27-1.1]
-basepython=python2.5
-deps=
-  django==1.1.2
+  https://github.com/django/django/tarball/master
   sorl-thumbnail==3.2.5
   PIL==1.1.7
 
 [testenv:py27-trunk]
 basepython=python2.5
 deps=
-  svn+http://code.djangoproject.com/svn/django/trunk#egg=django
+  https://github.com/django/django/tarball/master
   sorl-thumbnail==3.2.5
   PIL==1.1.7