'Test that when an ExtensionVersion is soft-deleted, we call
update_status_according_to_versions() on the Extension.'

@mock.patch.object(Extension, 'update_status_according_to_versions')
def test_status_update_on_soft_deletion(self, update_status_mock):

    extension = Extension.objects.create()
    version = ExtensionVersion.objects.create(extension=extension)
    update_status_mock.reset_mock()
    eq_(update_status_mock.call_count, 0)
    version.delete()
    eq_(version.deleted, True)
    eq_(update_status_mock.call_count, 1)
