def setUp(self): """Establish a clean test environment""" super(TestStore, self).setUp() self.stubs.Set(rbd_store, 'rados', mock_rados) self.stubs.Set(rbd_store, 'rbd', mock_rbd) self.store = rbd_store.Store() self.store.chunk_size = 2 self.called_commands_actual = [] self.called_commands_expected = [] self.store_specs = {'image': 'fake_image', 'snapshot': 'fake_snapshot'} self.location = StoreLocation(self.store_specs)
def setUp(self): """Establish a clean test environment""" super(TestStore, self).setUp() self.stubs.Set(rbd_store, 'rados', mock_rados) self.stubs.Set(rbd_store, 'rbd', mock_rbd) self.store = rbd_store.Store() self.store.chunk_size = 2 self.called_commands_actual = [] self.called_commands_expected = [] self.store_specs = {'image': 'fake_image', 'snapshot': 'fake_snapshot'} self.location = StoreLocation(self.store_specs) # Provide enough data to get more than one chunk iteration. self.data_len = 3 * units.Ki self.data_iter = six.StringIO('*' * self.data_len)