diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:27:04 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 19:25:02 +0100 |
| commit | 3278c31fa59b41d03aea167f4cf85f4ddf7f848d (patch) | |
| tree | 0c80b4868391296335580242c8e65052a4f62a6b /tests/delete | |
| parent | 6a682b38e75d4c975b4c4493565a59f1bc14397c (diff) | |
[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
Diffstat (limited to 'tests/delete')
| -rw-r--r-- | tests/delete/tests.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/delete/tests.py b/tests/delete/tests.py index 778943c96f..b8e9f7ebcd 100644 --- a/tests/delete/tests.py +++ b/tests/delete/tests.py @@ -132,8 +132,9 @@ class OnDeleteTests(TestCase): self.assertEqual(cm.exception.protected_objects, {a}) def test_do_nothing(self): - # Testing DO_NOTHING is a bit harder: It would raise IntegrityError for a normal model, - # so we connect to pre_delete and set the fk to a known value. + # Testing DO_NOTHING is a bit harder: It would raise IntegrityError for + # a normal model, so we connect to pre_delete and set the fk to a known + # value. replacement_r = R.objects.create() def check_do_nothing(sender, **kwargs): @@ -502,7 +503,8 @@ class DeletionTests(TestCase): # One query for Avatar.objects.all() and then one related fast delete for # each batch. fetches_to_mem = 1 + batches - # The Avatar objects are going to be deleted in batches of GET_ITERATOR_CHUNK_SIZE + # The Avatar objects are going to be deleted in batches of + # GET_ITERATOR_CHUNK_SIZE. queries = fetches_to_mem + TEST_SIZE // GET_ITERATOR_CHUNK_SIZE self.assertNumQueries(queries, Avatar.objects.all().delete) self.assertFalse(Avatar.objects.exists()) |
