'Cascade deletion works with ForeignKey.to_field set to non-PK.'

def test_to_field(self):

    apple = Food.objects.create(name='apple')
    eaten = Eaten.objects.create(food=apple, meal='lunch')
    apple.delete()
