'Deleting newest snapshot of a network disk when the domain is not
running should raise a NovaException.'

@mock.patch.object(host.Host, 'has_min_version', mock.Mock(return_value=True))
@mock.patch('nova.virt.libvirt.guest.Guest.is_active', mock.Mock(return_value=False))
def test_volume_snapshot_delete_when_dom_with_nw_disk_not_running(self):

    (mock_domain, mock_guest) = self._setup_block_rebase_domain_and_guest_mocks(self.dom_netdisk_xml)
    instance = objects.Instance(**self.inst)
    snapshot_id = 'snapshot-1234'
    with mock.patch.object(self.drvr._host, 'get_guest', return_value=mock_guest):
        ex = self.assertRaises(exception.NovaException, self.drvr._volume_snapshot_delete, self.c, instance, self.volume_uuid, snapshot_id, self.delete_info_1)
        self.assertIn('has    not    been    fully    tested', six.text_type(ex))
