

def test_add_multi_store(self):
    conf = copy.deepcopy(SWIFT_CONF)
    conf['default_swift_reference'] = 'store_2'
    self.config(**conf)
    moves.reload_module(swift)
    self.mock_keystone_client()
    self.store = Store(self.conf)
    self.store.configure()
    expected_swift_size = FIVE_KB
    expected_swift_contents = (b'*' * expected_swift_size)
    expected_image_id = str(uuid.uuid4())
    image_swift = six.BytesIO(expected_location)
    global SWIFT_PUT_OBJECT_CALLS
    SWIFT_PUT_OBJECT_CALLS = 0
    loc = 'swift+config://store_2/glance/%s'
    expected_location = (loc % expected_image_id)
    (location, size, checksum, arg) = self.store.add(expected_image_id, image_swift, expected_swift_size)
    self.assertEqual(expected_location, location)

dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py SwiftTests.test_add_multi_store/VarMisuse@95/140 `expected_swift_contents`->`expected_location`