'Test that when a ExtensionVersion instance is hard-deleted, the
attached files are too.'

def test_hard_delete_version_with_file(self):

    extension = Extension.objects.create()
    version = ExtensionVersion.objects.create(extension=extension, version='0.1')
    (file_path, signed_file_path) = self._create_files_for_version(version)
    version.delete(hard_delete=True)
    assert Extension.objects.count()
    assert (not ExtensionVersion.objects.count())
    assert (not private_storage.exists(file_path))
    assert (not public_storage.exists(signed_file_path))
