'Regression test for #9023: accessing the reverse relationship shouldn\'t
result in a cascading delete().'

def test_reverse_relationship_cache_cascade(self):

    bar = UndergroundBar.objects.create(place=self.p1, serves_cocktails=False)
    self.p1.undergroundbar
    bar.place.name = 'foo'
    bar.place = None
    bar.save()
    self.p1.delete()
    self.assertEqual(Place.objects.all().count(), 0)
    self.assertEqual(UndergroundBar.objects.all().count(), 1)
