mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed lookup.tests.LookupTests.test_exclude() on PostgreSQL 16 beta 1.
Order doesn't matter for this test, and on PostgreSQL 16 "%" is ordered before "_", so switch to sort by "pub_date".
This commit is contained in:
parent
40a2c811e3
commit
4f6a51dfe6
@ -691,15 +691,14 @@ class LookupTests(TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def test_exclude(self):
|
def test_exclude(self):
|
||||||
pub_date = datetime(2005, 11, 20)
|
|
||||||
a8 = Article.objects.create(
|
a8 = Article.objects.create(
|
||||||
headline="Article_ with underscore", pub_date=pub_date
|
headline="Article_ with underscore", pub_date=datetime(2005, 11, 20)
|
||||||
)
|
)
|
||||||
a9 = Article.objects.create(
|
a9 = Article.objects.create(
|
||||||
headline="Article% with percent sign", pub_date=pub_date
|
headline="Article% with percent sign", pub_date=datetime(2005, 11, 21)
|
||||||
)
|
)
|
||||||
a10 = Article.objects.create(
|
a10 = Article.objects.create(
|
||||||
headline="Article with \\ backslash", pub_date=pub_date
|
headline="Article with \\ backslash", pub_date=datetime(2005, 11, 22)
|
||||||
)
|
)
|
||||||
# exclude() is the opposite of filter() when doing lookups:
|
# exclude() is the opposite of filter() when doing lookups:
|
||||||
self.assertSequenceEqual(
|
self.assertSequenceEqual(
|
||||||
|
Loading…
Reference in New Issue
Block a user