mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #9982 -- Added test for saving OneToOneField field after saving related object.
Fixed in 519016e5f2
.
This commit is contained in:
parent
45edd746cc
commit
85195dd237
@ -280,6 +280,14 @@ class OneToOneTests(TestCase):
|
||||
self.assertEqual(num_deleted, 1)
|
||||
self.assertEqual(objs, {'one_to_one.Pointer': 1})
|
||||
|
||||
def test_save_nullable_o2o_after_parent(self):
|
||||
place = Place(name='Rose tattoo')
|
||||
bar = UndergroundBar(place=place)
|
||||
place.save()
|
||||
bar.save()
|
||||
bar.refresh_from_db()
|
||||
self.assertEqual(bar.place, place)
|
||||
|
||||
def test_reverse_object_does_not_exist_cache(self):
|
||||
"""
|
||||
Regression for #13839 and #17439.
|
||||
|
Loading…
Reference in New Issue
Block a user