def setUp(self): super(NetAppBaseClientTestCase, self).setUp() self.client = client_base.Client(**CONNECTION_INFO) self.client.connection = mock.MagicMock() self.connection = self.client.connection self.fake_volume = six.text_type(uuid.uuid4()) self.fake_lun = six.text_type(uuid.uuid4()) self.fake_size = '1024' self.fake_metadata = {'OsType': 'linux', 'SpaceReserved': 'true'}
def setUp(self): super(NetAppBaseClientTestCase, self).setUp() self.mock_object(client_base, 'LOG') self.mock_object(client_base.Client, '_init_ssh_client') self.client = client_base.Client(**CONNECTION_INFO) self.client.connection = mock.MagicMock() self.client.ssh_client = mock.MagicMock() self.connection = self.client.connection self.fake_volume = six.text_type(uuid.uuid4()) self.fake_lun = six.text_type(uuid.uuid4()) self.fake_size = '1024' self.fake_metadata = {'OsType': 'linux', 'SpaceReserved': 'true'} self.mock_send_request = self.mock_object(self.client, 'send_request')
def setUp(self): super(NetAppBaseClientTestCase, self).setUp() # Inject fake netapp_lib module classes. netapp_api.mock_netapp_lib([client_base]) self.mock_object(client_base, 'LOG') self.client = client_base.Client(**CONNECTION_INFO) self.client.connection = mock.MagicMock() self.connection = self.client.connection self.fake_volume = six.text_type(uuid.uuid4()) self.fake_lun = six.text_type(uuid.uuid4()) self.fake_size = '1024' self.fake_metadata = {'OsType': 'linux', 'SpaceReserved': 'true'}