'Test volume creation exception when can\'t make a hashed name.'

@mock.patch('socket.gethostbyname', return_value='123.123.123.123')
def test_create_volume_name_creation_fail(self, mock_ghn):

    ctxt = context.get_admin_context()
    extra_specs = {}
    type_ref = volume_types.create(ctxt, 'hgst-1', extra_specs)
    volume = {'id': '1', 'name': 'volume1', 'display_name': '', 'volume_type_id': type_ref['id'], 'size': 10}
    self._fail_space_list = True
    self.assertRaises(exception.VolumeDriverException, self.driver.create_volume, volume)
