'Initialise variable common to all the test cases.'

def setUp(self):

    super(TestDISCODriver, self).setUp()
    mock_exec = mock.Mock()
    mock_exec.return_value = ('', '')
    self.cfg = mock.Mock(spec=conf.Configuration)
    self.cfg.disco_client = '127.0.0.1'
    self.cfg.disco_client_port = '9898'
    self.cfg.disco_wsdl_path = 'somewhere'
    self.cfg.disco_volume_name_prefix = 'openstack-'
    self.cfg.disco_snapshot_check_timeout = 3600
    self.cfg.disco_restore_check_timeout = 3600
    self.cfg.disco_clone_check_timeout = 3600
    self.cfg.disco_retry_interval = 2
    self.cfg.num_volume_device_scan_tries = 3
    self.cfg.disco_choice_client = 'SOAP'
    self.cfg.disco_rest_ip = '127.0.0.1'
    self.FAKE_RESPONSE = {'standard': {'success': {'status': 0, 'result': 'a    normal    message'}, 'fail': {'status': 1, 'result': 'an    error    message'}}}
    mock.patch.object(client, 'Client', self.create_client).start()
    mock.patch.object(disco_api, 'DiscoApi', self.create_client).start()
    mock.patch.object(connector.InitiatorConnector, 'factory', self.get_mock_connector).start()
    self.driver = driver.DiscoDriver(execute=mock_exec, configuration=self.cfg)
    self.driver.do_setup(None)
    self.attach_detach = attach_detach.AttachDetachDiscoVolume(self.cfg)
    self.ctx = context.RequestContext('fake', 'fake', auth_token=True)
    self.volume = fake_volume.fake_volume_obj(self.ctx)
    self.volume['volume_id'] = '1234567'
    self.requester = self.driver.client
