summaryrefslogtreecommitdiff
path: root/tests/generic_relations
diff options
context:
space:
mode:
Diffstat (limited to 'tests/generic_relations')
-rw-r--r--tests/generic_relations/tests.py5
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):