  def testCreateDiskCopy1(self,
                          mock_create_disk,
                          mock_get_instance,
                          mock_get_boot_disk,
                          mock_get_disk,
                          mock_snapshot,
                          mock_snapshot_delete,
                          mock_list_subscription_ids,
                          mock_credentials,
                          mock_resource_group,
                          mock_disk_type,
                          mock_provider):
    """Test that a disk copy is correctly created.

    CreateDiskCopy(zone, instance_name='fake-vm-name', region='fake-region').
    This should grab the boot disk of the instance.
    """
    mock_provider.return_value = azure_mocks.MOCK_CAPACITY_PROVIDER
    mock_create_disk.return_value.done.return_value = True
    mock_create_disk.return_value.result.return_value = azure_mocks.MOCK_DISK_COPY
    mock_get_instance.return_value = azure_mocks.FAKE_INSTANCE
    mock_get_boot_disk.return_value = azure_mocks.FAKE_BOOT_DISK
    mock_snapshot.return_value = azure_mocks.FAKE_SNAPSHOT
    mock_snapshot_delete.return_value = None
    mock_list_subscription_ids.return_value = ['fake-subscription-id']
    mock_credentials.return_value = ('fake-subscription-id', mock.Mock())
    mock_resource_group.return_value = 'fake-resource-group'
    mock_disk_type.return_value = 'fake-disk-type'

    disk_copy = forensics.CreateDiskCopy(
        azure_mocks.FAKE_ACCOUNT.default_resource_group_name,
        instance_name=azure_mocks.FAKE_INSTANCE.name,
        region='fake-region')
    mock_get_instance.assert_called_once()
    mock_get_instance.assert_called_with('fake-vm-name')
    mock_get_boot_disk.assert_called_once()
    mock_get_disk.assert_not_called()
    self.assertIsInstance(disk_copy, compute.AZComputeDisk)
    self.assertEqual('fake_snapshot_name_f4c186ac_copy', disk_copy.name)
Test that a disk copy is correctly created.

CreateDiskCopy(zone, instance_name='fake-vm-name', region='fake-region').
This should grab the boot disk of the instance.
tests/providers/azure/test_forensics.py