diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-04 08:08:27 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-07 20:37:05 +0100 |
commit | 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 (patch) | |
tree | fa50869f5614295f462d9bf77fec59365c621609 /tests/delete | |
parent | 9c19aff7c7561e3a82978a272ecdaad40dda5c00 (diff) | |
download | django-7119f40c9881666b6f9b5cf7df09ee1d21cc8344.tar.gz |
Refs #33476 -- Refactored code to strictly match 88 characters line length.
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 597589b836..977294427c 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()) |