

def testGenerateUrl(self):
    'Test GenerateUrl method on S3 object store.'
    self._RunAsync(self.object_store.Put, self.key, 'foo')
    url = self.object_store.GenerateUrl(self.key, cache_control='private,max-age=31536000', expires_in=100)
    response = httpclient.HTTPClient().fetch(url, method='GET')
    self.assertEqual(response.body, 'foo')
    self.assertEqual(response.headers['Cache-Control'], 'private,max-age=31536000')

dataset/ETHPy150Open viewfinderco/viewfinder/backend/storage/test/s3_object_store_test.py S3ObjectStoreTestCase.testGenerateUrl/original