From d3ecdb088e44d12b61339e66c357e71bcd2237ea Mon Sep 17 00:00:00 2001 From: voron3x Date: Sun, 16 Aug 2020 22:29:45 +0300 Subject: [PATCH] issue-348 test for issue --- tests/tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/tests.py b/tests/tests.py index 49901b31..89bf4859 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -546,6 +546,13 @@ def test_217(self): def test_232(self): list(Post.objects.cache().filter(category__in=[None, 1]).filter(category=1)) + def test_348(self): + category = Category.objects.create() + Post.objects.create(category=category) + Post.objects.create(category=category) + objs = Post.objects.all().only("pk", "title").select_for_update() + objs.filter(pk__in=Post.objects.all().values("pk")).delete() + @unittest.skipIf(connection.vendor == 'mysql', 'In MySQL DDL is not transaction safe') def test_265(self): # Databases must have different structure,