mirror of https://github.com/django/django.git
Fixed typo in assertQuerysetEqual() exception message.
This commit is contained in:
parent
7587139d35
commit
64a0d1ef6e
|
@ -1066,8 +1066,10 @@ class TransactionTestCase(SimpleTestCase):
|
|||
# For example qs.iterator() could be passed as qs, but it does not
|
||||
# have 'ordered' attribute.
|
||||
if len(values) > 1 and hasattr(qs, 'ordered') and not qs.ordered:
|
||||
raise ValueError("Trying to compare non-ordered queryset "
|
||||
"against more than one ordered values")
|
||||
raise ValueError(
|
||||
'Trying to compare non-ordered queryset against more than one '
|
||||
'ordered value.'
|
||||
)
|
||||
return self.assertEqual(list(items), values, msg=msg)
|
||||
|
||||
def assertNumQueries(self, num, func=None, *args, using=DEFAULT_DB_ALIAS, **kwargs):
|
||||
|
|
|
@ -289,7 +289,10 @@ class AssertQuerysetEqualTests(TestCase):
|
|||
def test_undefined_order(self):
|
||||
# Using an unordered queryset with more than one ordered value
|
||||
# is an error.
|
||||
msg = 'Trying to compare non-ordered queryset against more than one ordered values'
|
||||
msg = (
|
||||
'Trying to compare non-ordered queryset against more than one '
|
||||
'ordered value.'
|
||||
)
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
self.assertQuerysetEqual(
|
||||
Person.objects.all(),
|
||||
|
|
Loading…
Reference in New Issue