diff --git a/tests/generic_relations/tests.py b/tests/generic_relations/tests.py
index 4c27b6f3d5..2e8a41cde3 100644
a
|
b
|
class ProxyRelatedModelTest(TestCase):
|
570 | 570 | newrel = ConcreteRelatedModel.objects.get(pk=newrel.pk) |
571 | 571 | self.assertEqual(base, newrel.bases.get()) |
572 | 572 | |
| 573 | def test_deletion_cascade(self): |
| 574 | """ |
| 575 | Regression for #29387: deletion does not cascase for proxy models. |
| 576 | |
| 577 | !!!: PASSES — cannot reproduce. |
| 578 | """ |
| 579 | # Concrete case |
| 580 | concrete_obj = ConcreteRelatedModel.objects.create() |
| 581 | base = ForProxyModelModel.objects.create(obj=concrete_obj) |
| 582 | |
| 583 | self.assertTrue(ForProxyModelModel.objects.filter(id=base.id).exists()) |
| 584 | concrete_obj.delete() |
| 585 | self.assertFalse(ForProxyModelModel.objects.filter(id=base.id).exists()) |
| 586 | |
| 587 | # Proxy case — should fail (but does not) |
| 588 | proxy_obj = ProxyRelatedModel.objects.create() |
| 589 | base = ForProxyModelModel.objects.create(obj=proxy_obj) |
| 590 | |
| 591 | self.assertTrue(ForProxyModelModel.objects.filter(id=base.id).exists()) |
| 592 | proxy_obj.delete() |
| 593 | self.assertFalse(ForProxyModelModel.objects.filter(id=base.id).exists()) |
| 594 | |
573 | 595 | |
574 | 596 | class TestInitWithNoneArgument(SimpleTestCase): |
575 | 597 | |