Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Test multiple Django and Python versions on Travis ci; also added tox support #157

Merged
merged 6 commits into from

2 participants

This page is out of date. Refresh to see the latest.
View
7 .travis.yml
@@ -1,7 +1,13 @@
language: python
python:
- 2.6
+ - 2.7
+env:
+ - DJANGO_VERSION=1.3.5
+ - DJANGO_VERSION=1.4.3
+ - DJANGO_VERSION=1.5c1
install:
+ - "if [[ $DJANGO_VERSION == '1.5c1' ]]; then pip install https://www.djangoproject.com/download/1.5c1/tarball/; else pip install Django==$DJANGO_VERSION; fi"
- "pip install . --use-mirrors"
- "pip install -r testproject/requirements.txt --use-mirrors"
script:
@@ -12,3 +18,4 @@ branches:
only:
- master
- dev
+ - tox
View
8 fiber/tests.py
@@ -1,6 +1,12 @@
import re
-from django.conf.urls import patterns, url
+try:
+ # Django >= 1.4
+ from django.conf.urls import patterns, url
+except ImportError:
+ # Django 1.3
+ from django.conf.urls.defaults import patterns, url
+
from django.views.generic import View
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
View
2  fiber/utils/validators.py
@@ -24,7 +24,7 @@ def __call__(self, value):
# check if it starts with http(s):// | ftp(s)://
# Django's validator only works with full urls that include a protocol.
if self.protocol_regex.search(url):
- django_url_validator = URLValidator(verify_exists=False)
+ django_url_validator = URLValidator()
django_url_validator(url)
else:
# check if it's a named url, and if so, if it's reversible
View
5 testproject/requirements.txt
@@ -1,3 +1,2 @@
-coverage==3.5.3
-django-jenkins==0.13.0
-Django==1.4.2
+coverage==3.6
+django-jenkins==0.14.0
View
29 testproject/testproject/settings_default.py
@@ -125,35 +125,6 @@
'django.contrib.admin',
)
-# A sample logging configuration. The only tangible logging
-# performed by this configuration is to send an email to
-# the site admins on every HTTP 500 error when DEBUG=False.
-# See http://docs.djangoproject.com/en/dev/topics/logging for
-# more details on how to customize your logging configuration.
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'filters': {
- 'require_debug_false': {
- '()': 'django.utils.log.RequireDebugFalse'
- }
- },
- 'handlers': {
- 'mail_admins': {
- 'level': 'ERROR',
- 'filters': ['require_debug_false'],
- 'class': 'django.utils.log.AdminEmailHandler'
- }
- },
- 'loggers': {
- 'django.request': {
- 'handlers': ['mail_admins'],
- 'level': 'ERROR',
- 'propagate': True,
- },
- }
-}
-
try:
import django_jenkins
installed_apps = list(INSTALLED_APPS)
View
8 testproject/testproject/urls.py
@@ -1,5 +1,11 @@
+try:
+ # Django >= 1.4
+ from django.conf.urls import patterns, include
+except ImportError:
+ # Django 1.3
+ from django.conf.urls.defaults import patterns, include
+
from django.conf import settings
-from django.conf.urls import patterns, include
from django.conf.urls.static import static
from django.contrib import admin
View
45 testproject/tox.ini
@@ -0,0 +1,45 @@
+[tox]
+envlist = django1.3-py26,django1.3-py27,django1.4-py26,django1.4-py27,django1.5-py26,django1.5-py27
+setupdir = ..
+
+[testenv]
+deps =
+ django-jenkins==0.14.0
+commands =
+ python manage.py jenkins
+
+[testenv:django1.3-py26]
+basepython = python2.6
+deps =
+ Django==1.3.5
+ {[testenv]deps}
+
+[testenv:django1.3-py27]
+basepython = python2.7
+deps =
+ Django==1.3.5
+ {[testenv]deps}
+
+[testenv:django1.4-py26]
+basepython = python2.6
+deps =
+ Django==1.4.3
+ {[testenv]deps}
+
+[testenv:django1.4-py27]
+basepython = python2.7
+deps =
+ Django==1.4.3
+ {[testenv]deps}
+
+[testenv:django1.5-py26]
+basepython = python2.6
+deps =
+ https://www.djangoproject.com/download/1.5c1/tarball/
+ {[testenv]deps}
+
+[testenv:django1.5-py27]
+basepython = python2.7
+deps =
+ https://www.djangoproject.com/download/1.5c1/tarball/
+ {[testenv]deps}
Something went wrong with that request. Please try again.