diff options
author | Egidijus Macijauskas <e.macijauskas@outlook.com> | 2021-02-11 06:11:49 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-02-11 08:33:30 +0100 |
commit | 4e8ecf0cb6ea36c45edb9cb86f0d63224e08097e (patch) | |
tree | 8389dc2c01a2c8e456212d1530337d8bfc8266cc /tests/delete_regress | |
parent | f8f35e8c530aaf440fa8160327461460d79f6db2 (diff) | |
download | django-4e8ecf0cb6ea36c45edb9cb86f0d63224e08097e.tar.gz |
Refs #19102 -- Removed flaky test Ticket19102Tests.test_ticket_19102_distinct_on.
The subquery pushdown only happens because another table is involved in
filter. It's not the distinct usage that causes the pushdown.
The distinct('description').order_by('pk') expression is not valid
because SELECT DISTINCT ON must match initial ORDER BY expressions
which is not the case here.
Diffstat (limited to 'tests/delete_regress')
-rw-r--r-- | tests/delete_regress/tests.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/tests/delete_regress/tests.py b/tests/delete_regress/tests.py index a1bead144e..e4fa59e89f 100644 --- a/tests/delete_regress/tests.py +++ b/tests/delete_regress/tests.py @@ -292,20 +292,6 @@ class Ticket19102Tests(TestCase): self.assertTrue(Login.objects.filter(pk=self.l2.pk).exists()) @skipUnlessDBFeature("update_can_self_select") - @skipUnlessDBFeature('can_distinct_on_fields') - def test_ticket_19102_distinct_on(self): - # Both Login objs should have same description so that only the one - # having smaller PK will be deleted. - Login.objects.update(description='description') - with self.assertNumQueries(1): - Login.objects.distinct('description').order_by('pk').filter( - orgunit__name__isnull=False - ).delete() - # Assumed that l1 which is created first has smaller PK. - self.assertFalse(Login.objects.filter(pk=self.l1.pk).exists()) - self.assertTrue(Login.objects.filter(pk=self.l2.pk).exists()) - - @skipUnlessDBFeature("update_can_self_select") def test_ticket_19102_select_related(self): with self.assertNumQueries(1): Login.objects.filter( |