Skip to content

Commit

Permalink
Tests updated for Django 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ellmetha committed Mar 15, 2015
1 parent df4b284 commit 44d4e07
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
8 changes: 6 additions & 2 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@


def run(verbosity, *args):
from django_nose import NoseTestSuiteRunner
runner = NoseTestSuiteRunner(verbosity=verbosity)
if django.VERSION < (1, 8):
from django_nose import NoseTestSuiteRunner
runner = NoseTestSuiteRunner(verbosity=verbosity)
else:
from django.test.runner import DiscoverRunner
runner = DiscoverRunner(verbosity=verbosity)

if not args:
args = ['tests']
Expand Down
3 changes: 3 additions & 0 deletions tests/unit/core/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def test_should_use_a_default_text_input_widget_with_formfields(self):
class TestableForm(forms.ModelForm):
class Meta:
model = TestableModel
exclude = []
# Run
form = TestableForm()
# Check
Expand All @@ -102,6 +103,7 @@ def test_can_use_a_custom_form_widget(self):
class TestableForm(forms.ModelForm):
class Meta:
model = TestableModel
exclude = []
# Run
form = TestableForm()
# Check
Expand All @@ -116,6 +118,7 @@ def test_should_not_allow_non_accessible_custom_form_widgets(self):
class TestableForm(forms.ModelForm):
class Meta:
model = TestableModel
exclude = []
machina_settings.MACHINA_MARKUP_WIDGET = None


Expand Down
26 changes: 25 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27-1.4, py27-1.5, py27-1.6, py27-1.7, py33-1.5, py33-1.6, py33-1.7, py34-1.5, py34-1.6, py34-1.7
envlist = py27-1.4, py27-1.5, py27-1.6, py27-1.7, py27-1.8, py33-1.5, py33-1.6, py33-1.7, py33-1.8, py34-1.5, py34-1.6, py34-1.7, py34-1.8

[flake8]
ignore = E501
Expand Down Expand Up @@ -32,6 +32,14 @@ deps =
-r{toxinidir}/requirements.txt
django>=1.7,<1.8a

[testenv:py27-1.8]
basepython =python2.7
deps =
-r{toxinidir}/requirements.txt
django>=1.8b2
git+git://github.com/django-mptt/django-mptt
git+git://github.com/lukaszb/django-guardian

[testenv:py33-1.5]
basepython = python3.3
deps =
Expand All @@ -50,6 +58,14 @@ deps =
-r{toxinidir}/requirements.txt
django>=1.7,<1.8a

[testenv:py33-1.8]
basepython =python3.3
deps =
-r{toxinidir}/requirements.txt
django>=1.8b2
git+git://github.com/django-mptt/django-mptt
git+git://github.com/lukaszb/django-guardian

[testenv:py34-1.5]
basepython = python3.4
deps =
Expand All @@ -68,6 +84,14 @@ deps =
-r{toxinidir}/requirements.txt
django>=1.7,<1.8a

[testenv:py34-1.8]
basepython =python3.4
deps =
-r{toxinidir}/requirements.txt
django>=1.8b2
git+git://github.com/django-mptt/django-mptt
git+git://github.com/lukaszb/django-guardian

[testenv:lint]
deps =
flake8
Expand Down

0 comments on commit 44d4e07

Please sign in to comment.