Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure: Adds missing parameter sp (permission) to Azure signature #723

Merged
merged 2 commits into from Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion storages/backends/azure_storage.py
Expand Up @@ -257,7 +257,7 @@ def url(self, name, expire=None):
make_blob_url_kwargs = {}
if expire:
sas_token = self.service.generate_blob_shared_access_signature(
self.azure_container, name, BlobPermissions.READ, expiry=self._expire_at(expire))
self.azure_container, name, permission=BlobPermissions.READ, expiry=self._expire_at(expire))
make_blob_url_kwargs['sas_token'] = sas_token

if self.azure_protocol:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_azure.py
Expand Up @@ -139,7 +139,7 @@ def test_url_expire(self):
self.storage._service.generate_blob_shared_access_signature.assert_called_once_with(
self.container_name,
'some_blob',
BlobPermissions.READ,
permission=BlobPermissions.READ,
expiry=fixed_time + timedelta(seconds=100))
self.storage._service.make_blob_url.assert_called_once_with(
container_name=self.container_name,
Expand Down