mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to assertQuerySetEqual().
Co-Authored-By: Michael Howitz <mh@gocept.com>
This commit is contained in:
committed by
Mariusz Felisiak
parent
d795259ea9
commit
f0c06f8ab7
@@ -13,12 +13,12 @@ class RightTests(TestCase):
|
||||
|
||||
def test_basic(self):
|
||||
authors = Author.objects.annotate(name_part=Right("name", 5))
|
||||
self.assertQuerysetEqual(
|
||||
self.assertQuerySetEqual(
|
||||
authors.order_by("name"), ["Smith", "honda"], lambda a: a.name_part
|
||||
)
|
||||
# If alias is null, set it to the first 2 lower characters of the name.
|
||||
Author.objects.filter(alias__isnull=True).update(alias=Lower(Right("name", 2)))
|
||||
self.assertQuerysetEqual(
|
||||
self.assertQuerySetEqual(
|
||||
authors.order_by("name"), ["smithj", "da"], lambda a: a.alias
|
||||
)
|
||||
|
||||
@@ -30,6 +30,6 @@ class RightTests(TestCase):
|
||||
authors = Author.objects.annotate(
|
||||
name_part=Right("name", Value(3, output_field=IntegerField()))
|
||||
)
|
||||
self.assertQuerysetEqual(
|
||||
self.assertQuerySetEqual(
|
||||
authors.order_by("name"), ["ith", "nda"], lambda a: a.name_part
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user