Skip to content

Commit 44d6074

Browse files
committed
Merge pull request #166 from emgerner-msft/dev
fixes
2 parents c54789d + 65c0003 commit 44d6074

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

azure/storage/blob/blockblobservice.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from .._serialization import (
2828
_get_request_body,
2929
_get_request_body_bytes_only,
30+
_add_metadata_headers,
3031
)
3132
from .._http import HTTPRequest
3233
from ._upload_chunking import (
@@ -197,7 +198,7 @@ def _put_blob(self, container_name, blob_name, blob, content_settings=None,
197198
('If-Match', _to_str(if_match)),
198199
('If-None-Match', _to_str(if_none_match))
199200
]
200-
_metadata_to_headers(metadata, request)
201+
_add_metadata_headers(metadata, request)
201202
if content_settings is not None:
202203
request.headers += content_settings._to_headers()
203204
request.body = _get_request_body_bytes_only('blob', blob)
@@ -344,7 +345,7 @@ def put_block_list(
344345
('If-Match', _to_str(if_match)),
345346
('If-None-Match', _to_str(if_none_match)),
346347
]
347-
_metadata_to_headers(metadata, request)
348+
_add_metadata_headers(metadata, request)
348349
if content_settings is not None:
349350
request.headers += content_settings._to_headers()
350351
request.body = _get_request_body(

azure/storage/blob/pageblobservice.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
)
2626
from .._serialization import (
2727
_get_request_body_bytes_only,
28+
_add_metadata_headers,
2829
)
2930
from .._http import HTTPRequest
3031
from ._error import (
@@ -200,7 +201,7 @@ def create_blob(
200201
('If-Match', _to_str(if_match)),
201202
('If-None-Match', _to_str(if_none_match))
202203
]
203-
_metadata_to_headers(metadata, request)
204+
_add_metadata_headers(metadata, request)
204205
if content_settings is not None:
205206
request.headers += content_settings._to_headers()
206207

tests/test_common_blob.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -304,21 +304,6 @@ def test_get_blob_with_range(self):
304304
self.assertIsInstance(blob, Blob)
305305
self.assertEqual(blob.content, self.byte_data[:6])
306306

307-
@record
308-
def test_get_blob_with_range_and_get_content_md5(self):
309-
# Arrange
310-
blob_name = self._create_block_blob()
311-
312-
# Act
313-
blob = self.bs.get_blob_to_bytes(self.container_name, blob_name,
314-
start_range=0, end_range=5,
315-
range_get_content_md5=True)
316-
317-
# Assert
318-
self.assertIsInstance(blob, Blob)
319-
self.assertEqual(blob.content, self.byte_data[:6])
320-
self.assertIsNotNone(blob.properties.content_settings.content_md5)
321-
322307
@record
323308
def test_get_blob_with_lease(self):
324309
# Arrange

0 commit comments

Comments
 (0)