mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Refs #33476 -- Refactored code to strictly match 88 characters line length.
This commit is contained in:
parent
9c19aff7c7
commit
7119f40c98
404 changed files with 5944 additions and 2842 deletions
|
|
@ -158,7 +158,10 @@ class OneToOneTests(TestCase):
|
|||
place = Place(name="User", address="London")
|
||||
with self.assertRaises(Restaurant.DoesNotExist):
|
||||
place.restaurant
|
||||
msg = "save() prohibited to prevent data loss due to unsaved related object 'place'."
|
||||
msg = (
|
||||
"save() prohibited to prevent data loss due to unsaved related object "
|
||||
"'place'."
|
||||
)
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
Restaurant.objects.create(
|
||||
place=place, serves_hot_dogs=True, serves_pizza=False
|
||||
|
|
@ -445,7 +448,10 @@ class OneToOneTests(TestCase):
|
|||
p.undergroundbar = b
|
||||
|
||||
# However saving the object is not allowed.
|
||||
msg = "save() prohibited to prevent data loss due to unsaved related object 'place'."
|
||||
msg = (
|
||||
"save() prohibited to prevent data loss due to unsaved related object "
|
||||
"'place'."
|
||||
)
|
||||
with self.assertNumQueries(0):
|
||||
with self.assertRaisesMessage(ValueError, msg):
|
||||
b.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue