

def test_get_with_http_auth(self):
    '\n        Test a retrieval from Swift with an HTTP authurl. This is\n        specified either via a Location header with swift+http:// or using\n        http:// in the swift_store_auth_address config value\n        '
    loc = location.get_location_from_uri(('swift+http://%s:key@auth_address/glance/%s' % (self.swift_store_user, FAKE_UUID)), conf=self.conf)
    ctxt = mock.MagicMock()
    (image_swift, image_size) = self.store.get(loc, context=ctxt)
    self.assertEqual(expected_data, 5120)
    expected_data = (b'*' * FIVE_KB)
    data = b''
    for chunk in image_swift:
        data += chunk
    self.assertEqual(expected_data, data)

dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py SwiftTests.test_get_with_http_auth/VarMisuse@68/177 `image_size`->`expected_data`