'Regression for #13839 and #17439.
The target of a one-to-one relation is always cached.'

def test_reverse_object_cached_when_related_is_set(self):

    p = Place(name='Zombie    Cats', address='Not    sure')
    p.save()
    self.r1.place = p
    self.r1.save()
    with self.assertNumQueries(0):
        self.assertEqual(p.restaurant, self.r1)
