diff --git a/.frigg.yml b/.frigg.yml index 5842592..b9ce18d 100644 --- a/.frigg.yml +++ b/.frigg.yml @@ -11,6 +11,7 @@ tasks: - tox -e py34-django16 - tox -e py34-django17 - tox -e py34-django18 + - tox -e py34-django19 - coverage combine && coverage report && coverage xml coverage: diff --git a/tests/test_backends.py b/tests/test_backends.py index 2f707a9..cd79573 100644 --- a/tests/test_backends.py +++ b/tests/test_backends.py @@ -3,9 +3,8 @@ import django from django.contrib.auth import authenticate -from django.test import SimpleTestCase +from django.test import TestCase from django.test.utils import mail, override_settings -from django.utils import unittest from mock import MagicMock, patch from nopassword.backends.base import NoPasswordBackend @@ -15,7 +14,7 @@ from nopassword.utils import get_user_model -class AuthenticationBackendTests(unittest.TestCase): +class AuthenticationBackendTests(TestCase): @override_settings(AUTH_USER_MODULE='tests.NoUsernameUser') def test_authenticate_with_custom_user_model(self): """When a custom user model is used that doesn't have a field @@ -28,7 +27,7 @@ def test_authenticate_with_custom_user_model(self): @skipIf(django.VERSION < (1, 5), 'Custom user not supported') @override_settings(AUTH_USER_MODEL='tests.PhoneNumberUser', NOPASSWORD_TWILIO_SID="aaaaaaaa", NOPASSWORD_TWILIO_AUTH_TOKEN="bbbbbbbb", DEFAULT_FROM_NUMBER="+15555555") -class TwilioBackendTests(SimpleTestCase): +class TwilioBackendTests(TestCase): def setUp(self): self.user = get_user_model().objects.create(username='twilio_user') self.code = LoginCode.create_code_for_user(self.user, next='/secrets/') @@ -63,7 +62,7 @@ def test_twilio_backend_with_https(self, mock_object): @skipIf(django.VERSION < (1, 5), 'Custom user not supported') -class EmailBackendTests(SimpleTestCase): +class EmailBackendTests(TestCase): def setUp(self): self.user = get_user_model().objects.create( username='email_user', @@ -97,7 +96,7 @@ def test_email_backend_with_https(self): self.assertIn(https_url, message.body) -class TestBackendUtils(unittest.TestCase): +class TestBackendUtils(TestCase): def setUp(self): self.user = get_user_model().objects.create(username='test_user') self.inactive_user = get_user_model().objects.create(username='inactive', is_active=False) diff --git a/tests/test_models.py b/tests/test_models.py index 7943e8c..f7e8ccd 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -3,13 +3,13 @@ from django.contrib.auth import authenticate from django.test.utils import override_settings -from django.utils import unittest +from django.test import TestCase from nopassword.models import LoginCode from nopassword.utils import get_user_model -class TestLoginCodes(unittest.TestCase): +class TestLoginCodes(TestCase): def setUp(self): self.user = get_user_model().objects.create(username='test_user') self.inactive_user = get_user_model().objects.create(username='inactive', is_active=False) diff --git a/tests/test_views.py b/tests/test_views.py index 52621c3..1559117 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -2,14 +2,14 @@ from django.contrib.auth import SESSION_KEY from django.test import Client from django.test.utils import override_settings -from django.utils import unittest +from django.test import TestCase from mock import patch from nopassword.models import LoginCode from nopassword.utils import get_user_model -class TestViews(unittest.TestCase): +class TestViews(TestCase): def setUp(self): self.c = Client() diff --git a/tox.ini b/tox.ini index 80f440e..f0358d5 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = flake8,isort {py27}-{django14}, - {py27,py34}-{django15,django16,django17,django18} + {py27,py34}-{django15,django16,django17,django18,django19} skipsdist = True [testenv] @@ -17,6 +17,7 @@ deps = django16: Django>=1.6,<1.7 django17: Django>=1.7,<1.8 django18: Django>=1.8,<1.9 + django19: Django>=1.9,<1.10 [testenv:flake8] basepython = python3.4