From 64a0d1ef6e7a6739148996e9584bbb61fe3dcc60 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Fri, 26 Feb 2021 07:26:48 -0500 Subject: [PATCH] Fixed typo in assertQuerysetEqual() exception message. --- django/test/testcases.py | 6 ++++-- tests/test_utils/tests.py | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/django/test/testcases.py b/django/test/testcases.py index eacf852118..98af1d9da1 100644 --- a/django/test/testcases.py +++ b/django/test/testcases.py @@ -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): diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index 9465ace804..7ceb720207 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -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(),