def test_has_private_bubble_other_clienterrors(botomock):
def mock_api_call(self, operation_name, api_params):
parsed_response = {'Error': {'Code': '403', 'Message': 'Not found'}}
raise ClientError(parsed_response, operation_name)
urls = (
'https://s3.example.com/private/prefix/',
)
downloader = SymbolDownloader(urls)
# Expect this to raise a ClientError because the bucket ('private')
# doesn't exist. So boto3 would normally trigger a ClientError
# with a code 'Forbidden'.
with botomock(mock_api_call):
with pytest.raises(ClientError):
downloader.has_symbol(
'xul.pdb',
'44E4EC8C2F41492B9369D6B9A059577C2',
'xul.sym'
)
评论列表
文章目录