diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-06-06 11:38:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-06 11:38:23 +0200 |
| commit | 4f6a51dfe6a4a8d5ed61c73b902e808109f142b0 (patch) | |
| tree | a9856a12b4328190f7c0f88a434d7cf73f3e955c /tests/lookup | |
| parent | 40a2c811e3ed7fdb26ab4443e39e113c2fcf2aa9 (diff) | |
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".
Diffstat (limited to 'tests/lookup')
| -rw-r--r-- | tests/lookup/tests.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/lookup/tests.py b/tests/lookup/tests.py index c639fe073e..398cc89cab 100644 --- a/tests/lookup/tests.py +++ b/tests/lookup/tests.py @@ -691,15 +691,14 @@ class LookupTests(TestCase): ) def test_exclude(self): - pub_date = datetime(2005, 11, 20) 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( - headline="Article% with percent sign", pub_date=pub_date + headline="Article% with percent sign", pub_date=datetime(2005, 11, 21) ) 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: self.assertSequenceEqual( |
