summaryrefslogtreecommitdiff
path: root/tests/order_with_respect_to
diff options
context:
space:
mode:
authordjango-bot <ops@djangoproject.com>2025-07-22 20:41:41 -0700
committernessita <124304+nessita@users.noreply.github.com>2025-07-23 20:17:55 -0300
commit69a93a88edb56ba47f624dac7a21aacc47ea474f (patch)
treef57507a4435d032493cae40e06ecb254790b67b2 /tests/order_with_respect_to
parent55b0cc21310b76ce4018dd793ba50556eaf0af06 (diff)
Refs #36500 -- Rewrapped long docstrings and block comments via a script.
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
Diffstat (limited to 'tests/order_with_respect_to')
-rw-r--r--tests/order_with_respect_to/base_tests.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/order_with_respect_to/base_tests.py b/tests/order_with_respect_to/base_tests.py
index 05c614f8fa..ec3793411d 100644
--- a/tests/order_with_respect_to/base_tests.py
+++ b/tests/order_with_respect_to/base_tests.py
@@ -129,7 +129,8 @@ class BaseOrderWithRespectToTests:
def test_bulk_create_with_empty_parent(self):
"""
- bulk_create() should properly set _order when parent has no existing children.
+ bulk_create() should properly set _order when parent has no existing
+ children.
"""
question = self.Question.objects.create(text="Test Question")
answers = [self.Answer(question=question, text=f"Answer {i}") for i in range(3)]
@@ -157,7 +158,8 @@ class BaseOrderWithRespectToTests:
def test_bulk_create_multiple_parents(self):
"""
- bulk_create() should maintain separate _order sequences for different parents.
+ bulk_create() should maintain separate _order sequences for different
+ parents.
"""
question0 = self.Question.objects.create(text="Question 0")
question1 = self.Question.objects.create(text="Question 1")
@@ -251,7 +253,8 @@ class BaseOrderWithRespectToTests:
# Existing answer to set initial _order=0.
self.Answer.objects.create(question=question, text="Existing Answer")
- # Two manually set _order=1 and one auto (which may also be assigned 1).
+ # Two manually set _order=1 and one auto (which may also be assigned
+ # 1).
answers = [
self.Answer(question=question, text="Manual Order 1", _order=1),
self.Answer(question=question, text="Auto Order 1"),
@@ -265,7 +268,8 @@ class BaseOrderWithRespectToTests:
# Manual values are as assigned, even if duplicated.
self.assertEqual(manual_1._order, 1)
self.assertEqual(manual_2._order, 1)
- # Auto-assigned orders may also use 1 or any value, depending on implementation.
- # If no collision logic, they may overlap with manual values.
+ # Auto-assigned orders may also use 1 or any value, depending on
+ # implementation. If no collision logic, they may overlap with manual
+ # values.
self.assertEqual(auto_1._order, 1)
self.assertEqual(auto_2._order, 2)