diff options
author | Hasan <hasan.r67@gmail.com> | 2016-01-18 12:15:45 +0330 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2016-01-29 13:37:33 -0500 |
commit | 26ad01719d73823e65c0358a2ee9941e0a888a63 (patch) | |
tree | 9e458f4c3428400e0970554ce19f6ed02e862a3b /tests/generic_relations | |
parent | 253adc2b8a52982139d40c4f55b3fd446e1cb8f3 (diff) | |
download | django-26ad01719d73823e65c0358a2ee9941e0a888a63.tar.gz |
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate.
Diffstat (limited to 'tests/generic_relations')
-rw-r--r-- | tests/generic_relations/tests.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py index 1d3d3d373b..436bb92222 100644 --- a/tests/generic_relations/tests.py +++ b/tests/generic_relations/tests.py @@ -7,7 +7,6 @@ from django.core.exceptions import FieldError from django.db import IntegrityError from django.db.models import Q from django.test import SimpleTestCase, TestCase -from django.utils import six from .models import ( AllowsNullGFK, Animal, Carrot, Comparison, ConcreteRelatedModel, @@ -721,8 +720,8 @@ class TestInitWithNoneArgument(SimpleTestCase): def test_none_not_allowed(self): # TaggedItem requires a content_type, initializing with None should # raise a ValueError. - with six.assertRaisesRegex(self, ValueError, - 'Cannot assign None: "TaggedItem.content_type" does not allow null values'): + msg = 'Cannot assign None: "TaggedItem.content_type" does not allow null values' + with self.assertRaisesMessage(ValueError, msg): TaggedItem(content_object=None) def test_none_allowed(self): |