Skip to content

Commit

Permalink
[Storage]Revert equal sign in async (Azure#13501)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiafu-msft authored and rakshith91 committed Sep 4, 2020
1 parent fb70d8d commit 05ee058
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def _get_canonicalized_resource(self, request):
uri_path = urlparse(request.http_request.url).path
try:
if isinstance(request.context.transport, AioHttpTransport) or \
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \
isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None),
AioHttpTransport):
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport):
uri_path = URL(uri_path)
return '/' + self.account_name + str(uri_path)
except TypeError:
Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions sdk/storage/azure-storage-blob/tests/test_common_blob_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,24 +272,6 @@ async def test_create_blob_with_question_mark(self, resource_group, location, st
content = data.decode('utf-8')
self.assertEqual(content, blob_data)

@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
async def test_create_blob_with_equal_sign(self, resource_group, location, storage_account, storage_account_key):
# Arrange
await self._setup(storage_account, storage_account_key)
blob_name = '=ques=tion!'
blob_data = u'???'

# Act
blob = self.bsc.get_blob_client(self.container_name, blob_name)
await blob.upload_blob(blob_data)

# Assert
stream = await blob.download_blob()
data = await stream.readall()
self.assertIsNotNone(data)
content = data.decode('utf-8')
self.assertEqual(content, blob_data)

@GlobalStorageAccountPreparer()
@AsyncStorageTestCase.await_prepared_test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def _get_canonicalized_resource(self, request):
uri_path = urlparse(request.http_request.url).path
try:
if isinstance(request.context.transport, AioHttpTransport) or \
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \
isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None),
AioHttpTransport):
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport):
uri_path = URL(uri_path)
return '/' + self.account_name + str(uri_path)
except TypeError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def _get_canonicalized_resource(self, request):
uri_path = urlparse(request.http_request.url).path
try:
if isinstance(request.context.transport, AioHttpTransport) or \
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \
isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None),
AioHttpTransport):
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport):
uri_path = URL(uri_path)
return '/' + self.account_name + str(uri_path)
except TypeError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ def _get_canonicalized_resource(self, request):
uri_path = urlparse(request.http_request.url).path
try:
if isinstance(request.context.transport, AioHttpTransport) or \
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport) or \
isinstance(getattr(getattr(request.context.transport, "_transport", None), "_transport", None),
AioHttpTransport):
isinstance(getattr(request.context.transport, "_transport", None), AioHttpTransport):
uri_path = URL(uri_path)
return '/' + self.account_name + str(uri_path)
except TypeError:
Expand Down

0 comments on commit 05ee058

Please sign in to comment.