mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +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
|
@ -11,7 +11,7 @@ from django.db.models.functions import (
|
|||
Upper,
|
||||
)
|
||||
from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature
|
||||
from django.utils import six, timezone
|
||||
from django.utils import timezone
|
||||
|
||||
from .models import Article, Author, Fan
|
||||
|
||||
|
@ -491,7 +491,7 @@ class FunctionTests(TestCase):
|
|||
|
||||
self.assertEqual(a.name_part_1[1:], a.name_part_2)
|
||||
|
||||
with six.assertRaisesRegex(self, ValueError, "'pos' must be greater than 0"):
|
||||
with self.assertRaisesMessage(ValueError, "'pos' must be greater than 0"):
|
||||
Author.objects.annotate(raises=Substr('name', 0))
|
||||
|
||||
def test_substr_with_expressions(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue