mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as appropriate.
This commit is contained in:
parent
253adc2b8a
commit
26ad01719d
23 changed files with 124 additions and 221 deletions
|
@ -5,7 +5,6 @@ from django.contrib.gis.gdal import HAS_GDAL
|
|||
from django.contrib.gis.geos import GEOSGeometry
|
||||
from django.forms import ValidationError
|
||||
from django.test import SimpleTestCase, override_settings, skipUnlessDBFeature
|
||||
from django.utils import six
|
||||
from django.utils.html import escape
|
||||
|
||||
|
||||
|
@ -40,8 +39,7 @@ class GeometryFieldTest(SimpleTestCase):
|
|||
"Testing GeometryField's handling of null (None) geometries."
|
||||
# Form fields, by default, are required (`required=True`)
|
||||
fld = forms.GeometryField()
|
||||
with six.assertRaisesRegex(self, forms.ValidationError,
|
||||
"No geometry value provided."):
|
||||
with self.assertRaisesMessage(forms.ValidationError, "No geometry value provided."):
|
||||
fld.clean(None)
|
||||
|
||||
# This will clean None as a geometry (See #10660).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue