Removed OAUTH_STORAGE_ACCOUNT from tests and fixed recordings

This commit is contained in:
zezha-msft 2019-08-01 16:43:01 -07:00
Родитель ba4355f814
Коммит 055de16f06
40 изменённых файлов: 997 добавлений и 2377 удалений

Просмотреть файл

@ -31,6 +31,7 @@ from .models import (
BatchSetBlobTierSubRequest,
BatchSubResponse,
CustomerProvidedEncryptionKey,
RehydratePriority,
)
from .pageblobservice import PageBlobService
from ._constants import __version__

Просмотреть файл

@ -124,7 +124,7 @@ class AppendBlobService(BaseBlobService):
def create_blob(self, container_name, blob_name, content_settings=None,
metadata=None, lease_id=None,
if_modified_since=None, if_unmodified_since=None,
if_match=None, if_none_match=None, cpk=None, timeout=None):
if_match=None, if_none_match=None, timeout=None, cpk=None):
'''
Creates a blob or overrides an existing blob. Use if_none_match=* to
prevent overriding an existing blob.
@ -204,7 +204,7 @@ class AppendBlobService(BaseBlobService):
appendpos_condition=None,
lease_id=None, if_modified_since=None,
if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
'''
Commits a new block of data to the end of an existing append blob.
@ -306,7 +306,7 @@ class AppendBlobService(BaseBlobService):
source_if_none_match=None, maxsize_condition=None,
appendpos_condition=None, lease_id=None, if_modified_since=None,
if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
"""
Creates a new block to be committed as part of a blob, where the contents are read from a source url.

Просмотреть файл

@ -1586,7 +1586,7 @@ class BaseBlobService(StorageClient):
def get_blob_properties(
self, container_name, blob_name, snapshot=None, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
'''
Returns all user-defined metadata, standard HTTP properties, and
system properties for the blob. It does not return the content of the blob.
@ -1656,7 +1656,7 @@ class BaseBlobService(StorageClient):
def set_blob_properties(
self, container_name, blob_name, content_settings=None, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
'''
Sets system properties on the blob. If one property is set for the
content_settings, all properties will be overriden.
@ -1890,8 +1890,7 @@ class BaseBlobService(StorageClient):
snapshot=None, start_range=None, end_range=None,
validate_content=False, progress_callback=None,
max_connections=2, lease_id=None, if_modified_since=None,
if_unmodified_since=None, if_match=None, if_none_match=None, cpk=None,
timeout=None):
if_unmodified_since=None, if_match=None, if_none_match=None, timeout=None, cpk=None):
'''
Downloads a blob to a file path, with automatic chunking and progress
notifications. Returns an instance of :class:`~azure.storage.blob.models.Blob` with
@ -2010,8 +2009,8 @@ class BaseBlobService(StorageClient):
if_unmodified_since,
if_match,
if_none_match,
cpk,
timeout)
timeout=timeout,
cpk=cpk)
return blob
@ -2020,7 +2019,7 @@ class BaseBlobService(StorageClient):
start_range=None, end_range=None, validate_content=False,
progress_callback=None, max_connections=2, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
'''
Downloads a blob to a stream, with automatic chunking and progress
@ -2257,7 +2256,7 @@ class BaseBlobService(StorageClient):
start_range=None, end_range=None, validate_content=False,
progress_callback=None, max_connections=2, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
'''
Downloads a blob as an array of bytes, with automatic chunking and
progress notifications. Returns an instance of :class:`~azure.storage.blob.models.Blob` with
@ -2365,8 +2364,8 @@ class BaseBlobService(StorageClient):
if_unmodified_since,
if_match,
if_none_match,
cpk,
timeout)
timeout=timeout,
cpk=cpk)
blob.content = stream.getvalue()
return blob
@ -2376,7 +2375,7 @@ class BaseBlobService(StorageClient):
start_range=None, end_range=None, validate_content=False,
progress_callback=None, max_connections=2, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
'''
Downloads a blob as unicode text, with automatic chunking and progress
notifications. Returns an instance of :class:`~azure.storage.blob.models.Blob` with
@ -2484,15 +2483,15 @@ class BaseBlobService(StorageClient):
if_unmodified_since,
if_match,
if_none_match,
cpk,
timeout)
timeout=timeout,
cpk=cpk)
blob.content = blob.content.decode(encoding)
return blob
def get_blob_metadata(
self, container_name, blob_name, snapshot=None, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None):
if_none_match=None, timeout=None, cpk=None):
'''
Returns all user-defined metadata for the specified blob or snapshot.
@ -2561,7 +2560,7 @@ class BaseBlobService(StorageClient):
def set_blob_metadata(self, container_name, blob_name,
metadata=None, lease_id=None,
if_modified_since=None, if_unmodified_since=None,
if_match=None, if_none_match=None, cpk=None, timeout=None):
if_match=None, if_none_match=None, timeout=None, cpk=None):
'''
Sets user-defined metadata for the specified blob as one or more
name-value pairs.
@ -3040,7 +3039,7 @@ class BaseBlobService(StorageClient):
def snapshot_blob(self, container_name, blob_name,
metadata=None, if_modified_since=None,
if_unmodified_since=None, if_match=None,
if_none_match=None, lease_id=None, cpk=None, timeout=None):
if_none_match=None, lease_id=None, timeout=None, cpk=None):
'''
Creates a read-only snapshot of a blob.

Просмотреть файл

@ -150,7 +150,7 @@ class BlockBlobService(BaseBlobService):
custom_domain, request_session, connection_string, socket_timeout, token_credential)
def put_block(self, container_name, blob_name, block, block_id,
validate_content=False, lease_id=None, cpk=None, timeout=None):
validate_content=False, lease_id=None, timeout=None, cpk=None):
'''
Creates a new block to be committed as part of a blob.
@ -198,8 +198,8 @@ class BlockBlobService(BaseBlobService):
def put_block_list(
self, container_name, blob_name, block_list, content_settings=None,
metadata=None, validate_content=False, lease_id=None, if_modified_since=None,
if_unmodified_since=None, if_match=None, if_none_match=None, cpk=None,
timeout=None, standard_blob_tier=None):
if_unmodified_since=None, if_match=None, if_none_match=None,
timeout=None, standard_blob_tier=None, cpk=None):
'''
Writes a blob by specifying the list of block IDs that make up the blob.
In order to be written as part of a blob, a block must have been
@ -336,7 +336,7 @@ class BlockBlobService(BaseBlobService):
def put_block_from_url(self, container_name, blob_name, copy_source_url, block_id,
source_range_start=None, source_range_end=None,
source_content_md5=None, lease_id=None, cpk=None, timeout=None):
source_content_md5=None, lease_id=None, timeout=None, cpk=None):
"""
Creates a new block to be committed as part of a blob.
@ -401,11 +401,10 @@ class BlockBlobService(BaseBlobService):
# ----Convenience APIs-----------------------------------------------------
def create_blob_from_path(
self, container_name, blob_name, file_path, content_settings=None,
metadata=None, validate_content=False, progress_callback=None,
max_connections=2, lease_id=None, if_modified_since=None,
if_unmodified_since=None, if_match=None, if_none_match=None, cpk=None, timeout=None, standard_blob_tier=None):
def create_blob_from_path(self, container_name, blob_name, file_path, content_settings=None, metadata=None,
validate_content=False, progress_callback=None, max_connections=2, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None, if_none_match=None,
timeout=None, standard_blob_tier=None, cpk=None):
'''
Creates a new blob from a file path, or updates the content of an
existing blob, with automatic chunking and progress notifications.
@ -482,31 +481,20 @@ class BlockBlobService(BaseBlobService):
count = path.getsize(file_path)
with open(file_path, 'rb') as stream:
return self.create_blob_from_stream(
container_name=container_name,
blob_name=blob_name,
stream=stream,
count=count,
content_settings=content_settings,
metadata=metadata,
validate_content=validate_content,
lease_id=lease_id,
progress_callback=progress_callback,
max_connections=max_connections,
if_modified_since=if_modified_since,
if_unmodified_since=if_unmodified_since,
if_match=if_match,
if_none_match=if_none_match,
standard_blob_tier=standard_blob_tier,
cpk=cpk,
timeout=timeout)
return self.create_blob_from_stream(container_name=container_name, blob_name=blob_name, stream=stream,
count=count, content_settings=content_settings, metadata=metadata,
validate_content=validate_content, progress_callback=progress_callback,
max_connections=max_connections, lease_id=lease_id,
if_modified_since=if_modified_since,
if_unmodified_since=if_unmodified_since, if_match=if_match,
if_none_match=if_none_match, timeout=timeout,
standard_blob_tier=standard_blob_tier, cpk=cpk)
def create_blob_from_stream(
self, container_name, blob_name, stream, count=None,
content_settings=None, metadata=None, validate_content=False,
progress_callback=None, max_connections=2, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None, use_byte_buffer=False, standard_blob_tier=None):
def create_blob_from_stream(self, container_name, blob_name, stream, count=None, content_settings=None,
metadata=None, validate_content=False, progress_callback=None, max_connections=2,
lease_id=None, if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, timeout=None, use_byte_buffer=False, standard_blob_tier=None,
cpk=None):
'''
Creates a new blob from a file/stream, or updates the content of
an existing blob, with automatic chunking and progress
@ -712,12 +700,10 @@ class BlockBlobService(BaseBlobService):
cpk=cpk,
)
def create_blob_from_bytes(
self, container_name, blob_name, blob, index=0, count=None,
content_settings=None, metadata=None, validate_content=False,
progress_callback=None, max_connections=2, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None, standard_blob_tier=None):
def create_blob_from_bytes(self, container_name, blob_name, blob, index=0, count=None, content_settings=None,
metadata=None, validate_content=False, progress_callback=None, max_connections=2,
lease_id=None, if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, timeout=None, standard_blob_tier=None, cpk=None):
'''
Creates a new blob from an array of bytes, or updates the content
of an existing blob, with automatic chunking and progress
@ -807,33 +793,19 @@ class BlockBlobService(BaseBlobService):
stream = BytesIO(blob)
stream.seek(index)
return self.create_blob_from_stream(
container_name=container_name,
blob_name=blob_name,
stream=stream,
count=count,
content_settings=content_settings,
metadata=metadata,
validate_content=validate_content,
progress_callback=progress_callback,
max_connections=max_connections,
lease_id=lease_id,
if_modified_since=if_modified_since,
if_unmodified_since=if_unmodified_since,
if_match=if_match,
if_none_match=if_none_match,
timeout=timeout,
use_byte_buffer=True,
standard_blob_tier=standard_blob_tier,
cpk=cpk,
)
return self.create_blob_from_stream(container_name=container_name, blob_name=blob_name, stream=stream,
count=count, content_settings=content_settings, metadata=metadata,
validate_content=validate_content, progress_callback=progress_callback,
max_connections=max_connections, lease_id=lease_id,
if_modified_since=if_modified_since,
if_unmodified_since=if_unmodified_since, if_match=if_match,
if_none_match=if_none_match, timeout=timeout, use_byte_buffer=True,
standard_blob_tier=standard_blob_tier, cpk=cpk)
def create_blob_from_text(
self, container_name, blob_name, text, encoding='utf-8',
content_settings=None, metadata=None, validate_content=False,
progress_callback=None, max_connections=2, lease_id=None,
if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, cpk=None, timeout=None, standard_blob_tier=None):
def create_blob_from_text(self, container_name, blob_name, text, encoding='utf-8', content_settings=None,
metadata=None, validate_content=False, progress_callback=None, max_connections=2,
lease_id=None, if_modified_since=None, if_unmodified_since=None, if_match=None,
if_none_match=None, timeout=None, standard_blob_tier=None, cpk=None):
'''
Creates a new blob from str/unicode, or updates the content of an
existing blob, with automatic chunking and progress notifications.
@ -912,25 +884,13 @@ class BlockBlobService(BaseBlobService):
_validate_not_none('encoding', encoding)
text = text.encode(encoding)
return self.create_blob_from_bytes(
container_name=container_name,
blob_name=blob_name,
blob=text,
index=0,
count=len(text),
content_settings=content_settings,
metadata=metadata,
validate_content=validate_content,
lease_id=lease_id,
progress_callback=progress_callback,
max_connections=max_connections,
if_modified_since=if_modified_since,
if_unmodified_since=if_unmodified_since,
if_match=if_match,
if_none_match=if_none_match,
standard_blob_tier=standard_blob_tier,
cpk=cpk,
timeout=timeout)
return self.create_blob_from_bytes(container_name=container_name, blob_name=blob_name, blob=text, index=0,
count=len(text), content_settings=content_settings, metadata=metadata,
validate_content=validate_content, progress_callback=progress_callback,
max_connections=max_connections, lease_id=lease_id,
if_modified_since=if_modified_since, if_unmodified_since=if_unmodified_since,
if_match=if_match, if_none_match=if_none_match, timeout=timeout,
standard_blob_tier=standard_blob_tier, cpk=cpk)
def set_standard_blob_tier(
self, container_name, blob_name, standard_blob_tier, timeout=None, rehydrate_priority=None):

Просмотреть файл

@ -72,7 +72,7 @@ setup(
]),
install_requires=[
'azure-common>=1.1.5',
'azure-storage-common~=2.0'
'azure-storage-common~=2.1'
],
extras_require={
":python_version<'3.0'": ['futures'],

Просмотреть файл

@ -17,5 +17,7 @@ from .models import (
SharePermissions,
FilePermissions,
DeleteSnapshot,
SMBProperties,
NTFSAttributes,
)
from ._constants import __version__

Просмотреть файл

@ -982,7 +982,7 @@ class FileService(StorageClient):
return True
def create_directory(self, share_name, directory_name, metadata=None,
fail_on_exist=False, file_permission=None, smb_properties=SMBProperties(), timeout=None):
fail_on_exist=False, timeout=None, file_permission=None, smb_properties=SMBProperties()):
'''
Creates a new directory under the specified share or parent directory.
If the directory with the same name already exists, the operation fails
@ -1591,7 +1591,7 @@ class FileService(StorageClient):
self._perform_request(request)
def set_file_properties(self, share_name, directory_name, file_name,
content_settings, file_permission=None, smb_properties=SMBProperties(), timeout=None):
content_settings, timeout=None, file_permission=None, smb_properties=SMBProperties()):
'''
Sets system properties on the file. If one property is set for the
content_settings, all properties will be overriden.
@ -1827,8 +1827,8 @@ class FileService(StorageClient):
self._perform_request(request)
def create_file(self, share_name, directory_name, file_name,
content_length, content_settings=None, metadata=None,
file_permission=None, smb_properties=SMBProperties(), timeout=None):
content_length, content_settings=None, metadata=None, timeout=None,
file_permission=None, smb_properties=SMBProperties()):
'''
Creates a new file.
@ -1944,8 +1944,8 @@ class FileService(StorageClient):
def create_file_from_text(self, share_name, directory_name, file_name,
text, encoding='utf-8', content_settings=None,
metadata=None, validate_content=False, file_permission=None,
smb_properties=SMBProperties(), timeout=None):
metadata=None, validate_content=False, timeout=None, file_permission=None,
smb_properties=SMBProperties()):
'''
Creates a new file from str/unicode, or updates the content of an
existing file, with automatic chunking and progress notifications.
@ -1998,8 +1998,8 @@ class FileService(StorageClient):
def create_file_from_bytes(
self, share_name, directory_name, file_name, file,
index=0, count=None, content_settings=None, metadata=None,
validate_content=False, progress_callback=None, max_connections=2,
file_permission=None, smb_properties=SMBProperties(), timeout=None):
validate_content=False, progress_callback=None, max_connections=2, timeout=None,
file_permission=None, smb_properties=SMBProperties()):
'''
Creates a new file from an array of bytes, or updates the content
of an existing file, with automatic chunking and progress
@ -2068,8 +2068,8 @@ class FileService(StorageClient):
def create_file_from_stream(
self, share_name, directory_name, file_name, stream, count,
content_settings=None, metadata=None, validate_content=False,
progress_callback=None, max_connections=2, file_permission=None, smb_properties=SMBProperties(),
timeout=None):
progress_callback=None, max_connections=2, timeout=None,
file_permission=None, smb_properties=SMBProperties()):
'''
Creates a new file from a file/stream, or updates the content of an
existing file, with automatic chunking and progress notifications.

Просмотреть файл

@ -72,7 +72,7 @@ setup(
]),
install_requires=[
'azure-common>=1.1.5',
'azure-storage-common~=2.0'
'azure-storage-common~=2.1'
],
extras_require={
":python_version<'3.0'": ['futures'],

Просмотреть файл

@ -72,6 +72,6 @@ setup(
]),
install_requires=[
'azure-common>=1.1.5',
'azure-storage-common~=2.0'
'azure-storage-common~=2.1'
],
)

Просмотреть файл

@ -275,8 +275,7 @@ class BlockBlobSamples():
settings = ContentSettings(content_type='html', content_language='fr')
metadata = {'val1': 'foo', 'val2': 'blah'}
blob_name = self._get_blob_reference()
self.service.create_blob_from_bytes(container_name, blob_name, data,
content_settings=settings,
self.service.create_blob_from_bytes(container_name, blob_name, data, content_settings=settings,
metadata=metadata)
blob = self.service.get_blob_to_bytes(container_name, blob_name)
metadata = blob.metadata # metadata={'val1': 'foo', 'val2': 'blah'}
@ -296,8 +295,7 @@ class BlockBlobSamples():
blob_name = self._get_blob_reference()
print('upload: ')
self.service.create_blob_from_bytes(container_name, blob_name, data,
progress_callback=upload_callback)
self.service.create_blob_from_bytes(container_name, blob_name, data, progress_callback=upload_callback)
print('download: ')
blob = self.service.get_blob_to_bytes(container_name, blob_name,
@ -312,8 +310,7 @@ class BlockBlobSamples():
input_stream = io.BytesIO(self._get_random_bytes(15))
output_stream = io.BytesIO()
blob_name = self._get_blob_reference()
self.service.create_blob_from_stream(container_name, blob_name,
input_stream, 15)
self.service.create_blob_from_stream(container_name, blob_name, input_stream, 15)
blob = self.service.get_blob_to_stream(container_name, blob_name,
output_stream)
content_length = blob.properties.content_length

Просмотреть файл

@ -270,8 +270,7 @@ class PageBlobSamples():
settings = ContentSettings(content_type='html', content_language='fr')
metadata = {'val1': 'foo', 'val2': 'blah'}
blob_name = self._get_blob_reference()
self.service.create_blob_from_bytes(container_name, blob_name, data,
content_settings=settings,
self.service.create_blob_from_bytes(container_name, blob_name, data, content_settings=settings,
metadata=metadata)
blob = self.service.get_blob_to_bytes(container_name, blob_name)
metadata = blob.metadata # metadata={'val1': 'foo', 'val2': 'blah'}
@ -291,8 +290,7 @@ class PageBlobSamples():
blob_name = self._get_blob_reference()
print('upload: ')
self.service.create_blob_from_bytes(container_name, blob_name, data,
progress_callback=upload_callback)
self.service.create_blob_from_bytes(container_name, blob_name, data, progress_callback=upload_callback)
print('download: ')
blob = self.service.get_blob_to_bytes(container_name, blob_name,
@ -307,8 +305,7 @@ class PageBlobSamples():
input_stream = io.BytesIO(self._get_random_bytes(512))
output_stream = io.BytesIO()
blob_name = self._get_blob_reference()
self.service.create_blob_from_stream(container_name, blob_name,
input_stream, 512)
self.service.create_blob_from_stream(container_name, blob_name, input_stream, 512)
blob = self.service.get_blob_to_stream(container_name, blob_name,
output_stream)
content_length = blob.properties.content_length

Просмотреть файл

@ -68,8 +68,7 @@ def upload_blob(service, name, connections):
sys.stdout.write('\tUp:')
start_time = datetime.datetime.now()
if isinstance(service, BlockBlobService):
service.create_blob_from_path(
CONTAINER_NAME, blob_name, file_name, max_connections=connections)
service.create_blob_from_path(CONTAINER_NAME, blob_name, file_name, max_connections=connections)
elif isinstance(service, PageBlobService):
service.create_blob_from_path(
CONTAINER_NAME, blob_name, file_name, max_connections=connections)
@ -77,8 +76,7 @@ def upload_blob(service, name, connections):
service.append_blob_from_path(
CONTAINER_NAME, blob_name, file_name, max_connections=connections)
else:
service.create_blob_from_path(
CONTAINER_NAME, blob_name, file_name, max_connections=connections)
service.create_blob_from_path(CONTAINER_NAME, blob_name, file_name, max_connections=connections)
elapsed_time = datetime.datetime.now() - start_time
sys.stdout.write('{0}s'.format(elapsed_time.total_seconds()))

Просмотреть файл

@ -271,9 +271,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
datetime.timedelta(minutes=15))
# Act
resp = self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_modified_since=test_datetime)
resp = self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_modified_since=test_datetime)
# Assert
self.assertIsNotNone(resp.etag)
@ -289,9 +287,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
# Act
with self.assertRaises(AzureHttpError):
self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_modified_since=test_datetime)
self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_modified_since=test_datetime)
# Assert
@ -305,9 +301,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
datetime.timedelta(minutes=15))
# Act
resp = self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_unmodified_since=test_datetime)
resp = self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_unmodified_since=test_datetime)
# Assert
self.assertIsNotNone(resp.etag)
@ -323,9 +317,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
# Act
with self.assertRaises(AzureHttpError):
self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_unmodified_since=test_datetime)
self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_unmodified_since=test_datetime)
# Assert
@ -338,9 +330,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
etag = self.bs.get_blob_properties(self.container_name, 'blob1').properties.etag
# Act
resp = self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_match=etag)
resp = self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_match=etag)
# Assert
self.assertIsNotNone(resp.etag)
@ -354,9 +344,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
# Act
with self.assertRaises(AzureHttpError):
resp = self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_match='0x111111111111111')
resp = self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_match='0x111111111111111')
# Assert
@ -368,9 +356,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
self.container_name, 'blob1', data)
# Act
resp = self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_none_match='0x111111111111111')
resp = self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_none_match='0x111111111111111')
# Assert
self.assertIsNotNone(resp.etag)
@ -385,9 +371,7 @@ class StorageBlobAccessConditionsTest(StorageTestCase):
# Act
with self.assertRaises(AzureHttpError):
resp = self.bs.create_blob_from_bytes(
self.container_name, 'blob1', data,
if_none_match=etag)
resp = self.bs.create_blob_from_bytes(self.container_name, 'blob1', data, if_none_match=etag)
# Assert

Просмотреть файл

@ -329,8 +329,8 @@ class StorageBlobEncryptionTest(StorageTestCase):
blob_name = self._get_blob_reference('block_blob')
# Act
self.bbs.create_blob_from_bytes(self.container_name, blob_name, content, max_connections=3,
count=self.bbs.MAX_SINGLE_PUT_SIZE+53)
self.bbs.create_blob_from_bytes(self.container_name, blob_name, content,
count=self.bbs.MAX_SINGLE_PUT_SIZE + 53, max_connections=3)
blob = self.bbs.get_blob_to_bytes(self.container_name, blob_name)
# Assert
@ -364,8 +364,7 @@ class StorageBlobEncryptionTest(StorageTestCase):
# Act
self.bbs.create_blob_from_bytes(self.container_name, blob_name, content, index=2,
count=self.bbs.MAX_SINGLE_PUT_SIZE + 5,
max_connections=1)
count=self.bbs.MAX_SINGLE_PUT_SIZE + 5, max_connections=1)
blob = self.bbs.get_blob_to_bytes(self.container_name, blob_name)
# Assert

Просмотреть файл

@ -62,11 +62,15 @@ class StorageBlobSASTest(StorageTestCase):
def _get_user_delegation_key(self, key_start_time, key_expiry_time):
token_credential = TokenCredential(self.generate_oauth_token())
service = BlockBlobService(self.settings.OAUTH_STORAGE_ACCOUNT_NAME, token_credential=token_credential)
service = BlockBlobService(self.settings.STORAGE_ACCOUNT_NAME, token_credential=token_credential)
return service.get_user_delegation_key(key_start_time, key_expiry_time)
@record
def test_get_user_delegation_key(self):
# SAS URL is calculated from storage key, so this test runs live only
if TestMode.need_recording_file(self.test_mode):
return
# Act
start = datetime.utcnow()
expiry = datetime.utcnow() + timedelta(hours=1)

Просмотреть файл

@ -365,8 +365,7 @@ class StorageBlockBlobTest(StorageTestCase):
content_settings=ContentSettings(
content_type='image/png',
content_language='spanish')
self.bs.create_blob_from_bytes(self.container_name, blob_name, data,
content_settings=content_settings)
self.bs.create_blob_from_bytes(self.container_name, blob_name, data, content_settings=content_settings)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)
@ -523,8 +522,7 @@ class StorageBlockBlobTest(StorageTestCase):
def callback(current, total):
progress.append((current, total))
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH,
progress_callback=callback)
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH, progress_callback=callback)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)
@ -605,8 +603,7 @@ class StorageBlockBlobTest(StorageTestCase):
blob_tier = StandardBlobTier.Cool
# Act
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH,
max_connections=1,
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH, max_connections=1,
standard_blob_tier=blob_tier)
blob = self.bs.get_blob_properties(self.container_name, blob_name)
@ -649,8 +646,8 @@ class StorageBlockBlobTest(StorageTestCase):
# Act
with open(FILE_PATH, 'rb') as stream:
non_seekable_file = StorageBlockBlobTest.NonSeekableFile(stream)
self.bs.create_blob_from_stream(self.container_name, blob_name, non_seekable_file,
count=blob_size, max_connections=1)
self.bs.create_blob_from_stream(self.container_name, blob_name, non_seekable_file, count=blob_size,
max_connections=1)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data[:blob_size])
@ -669,8 +666,7 @@ class StorageBlockBlobTest(StorageTestCase):
# Act
with open(FILE_PATH, 'rb') as stream:
non_seekable_file = StorageBlockBlobTest.NonSeekableFile(stream)
self.bs.create_blob_from_stream(self.container_name, blob_name,
non_seekable_file, max_connections=1)
self.bs.create_blob_from_stream(self.container_name, blob_name, non_seekable_file, max_connections=1)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)
@ -735,8 +731,8 @@ class StorageBlockBlobTest(StorageTestCase):
content_language='spanish')
blob_size = len(data) - 301
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
blob_size, content_settings=content_settings)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, blob_size,
content_settings=content_settings)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data[:blob_size])
@ -760,8 +756,7 @@ class StorageBlockBlobTest(StorageTestCase):
content_type='image/png',
content_language='spanish')
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
content_settings=content_settings)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, content_settings=content_settings)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)
@ -782,8 +777,8 @@ class StorageBlockBlobTest(StorageTestCase):
# Act
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
count=blob_size, standard_blob_tier=blob_tier)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, count=blob_size,
standard_blob_tier=blob_tier)
# Assert
properties = self.bs.get_blob_properties(self.container_name, blob_name).properties
@ -803,8 +798,7 @@ class StorageBlockBlobTest(StorageTestCase):
# Act
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
standard_blob_tier=blob_tier)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, standard_blob_tier=blob_tier)
blob_properties = self.bs.get_blob_properties(self.container_name, blob_name).properties
# Assert
@ -852,8 +846,7 @@ class StorageBlockBlobTest(StorageTestCase):
def callback(current, total):
progress.append((current, total))
self.bs.create_blob_from_text(self.container_name, blob_name, text, 'utf-16',
progress_callback=callback)
self.bs.create_blob_from_text(self.container_name, blob_name, text, 'utf-16', progress_callback=callback)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)
@ -899,8 +892,7 @@ class StorageBlockBlobTest(StorageTestCase):
data = b'hello world'
# Act
self.bs.create_blob_from_bytes(self.container_name, blob_name, data,
validate_content=True)
self.bs.create_blob_from_bytes(self.container_name, blob_name, data, validate_content=True)
# Assert
@ -914,8 +906,7 @@ class StorageBlockBlobTest(StorageTestCase):
data = self.get_random_bytes(LARGE_BLOB_SIZE)
# Act
self.bs.create_blob_from_bytes(self.container_name, blob_name, data,
validate_content=True)
self.bs.create_blob_from_bytes(self.container_name, blob_name, data, validate_content=True)
# Assert

Просмотреть файл

@ -95,8 +95,7 @@ class StorageCommonBlobTest(StorageTestCase):
if not blob_data:
blob_data = b'12345678' * 1024 * 1024
source_blob_name = self._get_blob_reference()
self.bs2.create_blob_from_bytes(
self.remote_container_name, source_blob_name, blob_data)
self.bs2.create_blob_from_bytes(self.remote_container_name, source_blob_name, blob_data)
return source_blob_name
def _wait_for_async_copy(self, container_name, blob_name):
@ -314,9 +313,7 @@ class StorageCommonBlobTest(StorageTestCase):
# Act
data = b'hello world again'
resp = self.bs.create_blob_from_bytes (
self.container_name, blob_name, data,
lease_id=lease_id)
resp = self.bs.create_blob_from_bytes(self.container_name, blob_name, data, lease_id=lease_id)
# Assert
self.assertIsNotNone(resp.etag)
@ -332,8 +329,7 @@ class StorageCommonBlobTest(StorageTestCase):
# Act
data = b'hello world'
resp = self.bs.create_blob_from_bytes(
self.container_name, blob_name, data, metadata=metadata)
resp = self.bs.create_blob_from_bytes(self.container_name, blob_name, data, metadata=metadata)
# Assert
self.assertIsNotNone(resp.etag)
@ -370,8 +366,7 @@ class StorageCommonBlobTest(StorageTestCase):
# Arrange
blob_name = self._create_block_blob()
snapshot = self.bs.snapshot_blob(self.container_name, blob_name)
self.bs.create_blob_from_bytes (self.container_name, blob_name,
b'hello world again', )
self.bs.create_blob_from_bytes(self.container_name, blob_name, b'hello world again')
# Act
blob_previous = self.bs.get_blob_to_bytes(
@ -1185,14 +1180,12 @@ class StorageCommonBlobTest(StorageTestCase):
# Act
lease_id = self.bs.acquire_blob_lease(
self.container_name, blob_name, lease_duration=15)
resp2 = self.bs.create_blob_from_bytes (self.container_name, blob_name, b'hello 2',
lease_id=lease_id)
resp2 = self.bs.create_blob_from_bytes(self.container_name, blob_name, b'hello 2', lease_id=lease_id)
self.sleep(15)
# Assert
with self.assertRaises(AzureHttpError):
self.bs.create_blob_from_bytes (self.container_name, blob_name, b'hello 3',
lease_id=lease_id)
self.bs.create_blob_from_bytes(self.container_name, blob_name, b'hello 3', lease_id=lease_id)
@record
def test_lease_blob_with_proposed_lease_id(self):
@ -1233,11 +1226,11 @@ class StorageCommonBlobTest(StorageTestCase):
lease_duration=15)
lease_time = self.bs.break_blob_lease(self.container_name, blob_name,
lease_break_period=5)
blob = self.bs.create_blob_from_bytes (self.container_name, blob_name, b'hello 2', lease_id=lease_id)
blob = self.bs.create_blob_from_bytes(self.container_name, blob_name, b'hello 2', lease_id=lease_id)
self.sleep(5)
with self.assertRaises(AzureHttpError):
self.bs.create_blob_from_bytes (self.container_name, blob_name, b'hello 3', lease_id=lease_id)
self.bs.create_blob_from_bytes(self.container_name, blob_name, b'hello 3', lease_id=lease_id)
# Assert
self.assertIsNotNone(lease_id)
@ -1290,8 +1283,7 @@ class StorageCommonBlobTest(StorageTestCase):
# Act
data = u'hello world啊齄丂狛狜'.encode('utf-8')
resp = self.bs.create_blob_from_bytes (
self.container_name, blob_name, data, )
resp = self.bs.create_blob_from_bytes(self.container_name, blob_name, data)
# Assert
self.assertIsNotNone(resp.etag)
@ -1316,7 +1308,7 @@ class StorageCommonBlobTest(StorageTestCase):
blob_name = 'blob1.txt'
container_name = self._get_container_reference()
self.bs.create_container(container_name, None, 'blob')
self.bs.create_blob_from_bytes (container_name, blob_name, data, )
self.bs.create_blob_from_bytes(container_name, blob_name, data)
# Act
url = self.bs.make_blob_url(container_name, blob_name)
@ -1333,7 +1325,7 @@ class StorageCommonBlobTest(StorageTestCase):
blob_name = 'blob1.txt'
container_name = self._get_container_reference()
self.bs.create_container(container_name, None, 'blob')
self.bs.create_blob_from_bytes (container_name, blob_name, data, )
self.bs.create_blob_from_bytes(container_name, blob_name, data)
# Act
service = BlockBlobService(
@ -1351,7 +1343,7 @@ class StorageCommonBlobTest(StorageTestCase):
token_credential = TokenCredential(self.generate_oauth_token())
# Action 1: make sure token works
service = BlockBlobService(self.settings.OAUTH_STORAGE_ACCOUNT_NAME, token_credential=token_credential)
service = BlockBlobService(self.settings.STORAGE_ACCOUNT_NAME, token_credential=token_credential)
result = service.exists("test")
self.assertIsNotNone(result)

Просмотреть файл

@ -711,8 +711,8 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'blob1', data, )
self.bs.create_blob_from_bytes (container_name, 'blob2', data, )
self.bs.create_blob_from_bytes(container_name, 'blob1', data)
self.bs.create_blob_from_bytes(container_name, 'blob2', data)
# Act
blobs = list(self.bs.list_blob_names(container_name))
@ -725,8 +725,8 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'blob1', data, )
self.bs.create_blob_from_bytes (container_name, 'blob2', data, )
self.bs.create_blob_from_bytes(container_name, 'blob1', data)
self.bs.create_blob_from_bytes(container_name, 'blob2', data)
# Act
blobs = list(self.bs.list_blobs(container_name))
@ -747,7 +747,7 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'blob1', data, )
self.bs.create_blob_from_bytes(container_name, 'blob1', data)
lease = self.bs.acquire_blob_lease(container_name, 'blob1')
# Act
@ -768,9 +768,9 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'bloba1', data, )
self.bs.create_blob_from_bytes (container_name, 'bloba2', data, )
self.bs.create_blob_from_bytes (container_name, 'blobb1', data, )
self.bs.create_blob_from_bytes(container_name, 'bloba1', data)
self.bs.create_blob_from_bytes(container_name, 'bloba2', data)
self.bs.create_blob_from_bytes(container_name, 'blobb1', data)
# Act
resp = list(self.bs.list_blobs(container_name, 'bloba'))
@ -786,10 +786,10 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'bloba1', data, )
self.bs.create_blob_from_bytes (container_name, 'bloba2', data, )
self.bs.create_blob_from_bytes (container_name, 'bloba3', data, )
self.bs.create_blob_from_bytes (container_name, 'blobb1', data, )
self.bs.create_blob_from_bytes(container_name, 'bloba1', data)
self.bs.create_blob_from_bytes(container_name, 'bloba2', data)
self.bs.create_blob_from_bytes(container_name, 'bloba3', data)
self.bs.create_blob_from_bytes(container_name, 'blobb1', data)
# Act
blobs = list(self.bs.list_blobs(container_name, num_results=2))
@ -805,8 +805,8 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'blob1', data, )
self.bs.create_blob_from_bytes (container_name, 'blob2', data, )
self.bs.create_blob_from_bytes(container_name, 'blob1', data)
self.bs.create_blob_from_bytes(container_name, 'blob2', data)
self.bs.snapshot_blob(container_name, 'blob1')
# Act
@ -826,10 +826,8 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'blob1', data,
metadata={'number': '1', 'name': 'bob'})
self.bs.create_blob_from_bytes (container_name, 'blob2', data,
metadata={'number': '2', 'name': 'car'})
self.bs.create_blob_from_bytes(container_name, 'blob1', data, metadata={'number': '1', 'name': 'bob'})
self.bs.create_blob_from_bytes(container_name, 'blob2', data, metadata={'number': '2', 'name': 'car'})
self.bs.snapshot_blob(container_name, 'blob1')
# Act
@ -852,8 +850,7 @@ class StorageContainerTest(StorageTestCase):
self.bs.put_block(container_name, 'blob1', b'AAA', '1')
self.bs.put_block(container_name, 'blob1', b'BBB', '2')
self.bs.put_block(container_name, 'blob1', b'CCC', '3')
self.bs.create_blob_from_bytes (container_name, 'blob2', data,
metadata={'number': '2', 'name': 'car'})
self.bs.create_blob_from_bytes(container_name, 'blob2', data, metadata={'number': '2', 'name': 'car'})
# Act
blobs = list(self.bs.list_blobs(container_name, include=Include.UNCOMMITTED_BLOBS))
@ -868,8 +865,7 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes(container_name, 'blob1', data,
metadata={'status': 'original'})
self.bs.create_blob_from_bytes(container_name, 'blob1', data, metadata={'status': 'original'})
sourceblob = 'https://{0}.blob.core.windows.net/{1}/{2}'.format(
self.settings.STORAGE_ACCOUNT_NAME,
container_name,
@ -906,10 +902,10 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'a/blob1', data, )
self.bs.create_blob_from_bytes (container_name, 'a/blob2', data, )
self.bs.create_blob_from_bytes (container_name, 'b/blob1', data, )
self.bs.create_blob_from_bytes (container_name, 'blob1', data, )
self.bs.create_blob_from_bytes(container_name, 'a/blob1', data)
self.bs.create_blob_from_bytes(container_name, 'a/blob2', data)
self.bs.create_blob_from_bytes(container_name, 'b/blob1', data)
self.bs.create_blob_from_bytes(container_name, 'blob1', data)
# Act
resp = list(self.bs.list_blobs(container_name, delimiter='/'))
@ -926,10 +922,8 @@ class StorageContainerTest(StorageTestCase):
# Arrange
container_name = self._create_container()
data = b'hello world'
self.bs.create_blob_from_bytes (container_name, 'blob1', data,
metadata={'number': '1', 'name': 'bob'})
self.bs.create_blob_from_bytes (container_name, 'blob2', data,
metadata={'number': '2', 'name': 'car'})
self.bs.create_blob_from_bytes(container_name, 'blob1', data, metadata={'number': '1', 'name': 'bob'})
self.bs.create_blob_from_bytes(container_name, 'blob2', data, metadata={'number': '2', 'name': 'car'})
self.bs.snapshot_blob(container_name, 'blob1')
# Act

Просмотреть файл

@ -112,6 +112,10 @@ class StorageCPKTest(StorageTestCase):
@record
def test_create_block_blob_with_chunks(self):
# parallel operation
if TestMode.need_recording_file(self.test_mode):
return
# Arrange
blob_name = self._get_blob_reference()
@ -388,6 +392,9 @@ class StorageCPKTest(StorageTestCase):
@record
def test_create_page_blob_with_chunks(self):
if TestMode.need_recording_file(self.test_mode):
return
# Arrange
blob_name = self._get_blob_reference()
# Act
@ -415,8 +422,7 @@ class StorageCPKTest(StorageTestCase):
def test_get_set_blob_properties(self):
# Arrange
blob_name = self._get_blob_reference()
self.bbs.create_blob_from_bytes(self.container_name, blob_name, b'AAABBBCCC',
cpk=TEST_ENCRYPTION_KEY)
self.bbs.create_blob_from_bytes(self.container_name, blob_name, b'AAABBBCCC', cpk=TEST_ENCRYPTION_KEY)
# Act without the encryption key should fail
with self.assertRaises(AzureHttpError):
@ -448,8 +454,7 @@ class StorageCPKTest(StorageTestCase):
def test_get_set_blob_metadata(self):
# Arrange
blob_name = self._get_blob_reference()
self.bbs.create_blob_from_bytes(self.container_name, blob_name, b'AAABBBCCC',
cpk=TEST_ENCRYPTION_KEY)
self.bbs.create_blob_from_bytes(self.container_name, blob_name, b'AAABBBCCC', cpk=TEST_ENCRYPTION_KEY)
metadata = {'hello': 'world', 'number': '42', 'UP': 'UPval'}
# Act without cpk should fail
@ -475,8 +480,7 @@ class StorageCPKTest(StorageTestCase):
def test_snapshot_blob(self):
# Arrange
blob_name = self._get_blob_reference()
self.bbs.create_blob_from_bytes(self.container_name, blob_name, b'AAABBBCCC',
cpk=TEST_ENCRYPTION_KEY)
self.bbs.create_blob_from_bytes(self.container_name, blob_name, b'AAABBBCCC', cpk=TEST_ENCRYPTION_KEY)
# Act without cpk should not work
with self.assertRaises(AzureHttpError):

Просмотреть файл

@ -193,7 +193,8 @@ class StorageGetBlobTest(StorageTestCase):
# Arrange
snapshot = self.bs.snapshot_blob(self.container_name, self.byte_blob)
self.bs.create_blob_from_bytes(self.container_name, self.byte_blob, self.byte_data) # Modify the blob so the Etag no longer matches
self.bs.create_blob_from_bytes(self.container_name, self.byte_blob,
self.byte_data) # Modify the blob so the Etag no longer matches
# Act
blob = self.bs.get_blob_to_bytes(self.container_name, self.byte_blob, snapshot.snapshot)

Просмотреть файл

@ -218,8 +218,7 @@ class StorageLargeBlockBlobTest(StorageTestCase):
def callback(current, total):
progress.append((current, total))
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH,
progress_callback=callback)
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH, progress_callback=callback)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)
@ -326,8 +325,8 @@ class StorageLargeBlockBlobTest(StorageTestCase):
content_language='spanish')
blob_size = len(data) - 301
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
blob_size, content_settings=content_settings)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, blob_size,
content_settings=content_settings)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data[:blob_size])
@ -351,8 +350,7 @@ class StorageLargeBlockBlobTest(StorageTestCase):
content_type='image/png',
content_language='spanish')
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
content_settings=content_settings)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, content_settings=content_settings)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)

Просмотреть файл

@ -941,8 +941,7 @@ class StoragePageBlobTest(StorageTestCase):
def callback(current, total):
progress.append((current, total))
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH,
progress_callback=callback)
self.bs.create_blob_from_path(self.container_name, blob_name, FILE_PATH, progress_callback=callback)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data)
@ -1017,8 +1016,7 @@ class StoragePageBlobTest(StorageTestCase):
blob_size = len(data)
with open(FILE_PATH, 'rb') as stream:
non_seekable_file = StoragePageBlobTest.NonSeekableFile(stream)
self.bs.create_blob_from_stream(self.container_name, blob_name,
non_seekable_file, blob_size,
self.bs.create_blob_from_stream(self.container_name, blob_name, non_seekable_file, blob_size,
max_connections=1)
# Assert
@ -1043,8 +1041,8 @@ class StoragePageBlobTest(StorageTestCase):
blob_size = len(data)
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
blob_size, progress_callback=callback)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, blob_size,
progress_callback=callback)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data[:blob_size])
@ -1088,8 +1086,8 @@ class StoragePageBlobTest(StorageTestCase):
blob_size = len(data) - 512
with open(FILE_PATH, 'rb') as stream:
self.bs.create_blob_from_stream(self.container_name, blob_name, stream,
blob_size, progress_callback=callback)
self.bs.create_blob_from_stream(self.container_name, blob_name, stream, blob_size,
progress_callback=callback)
# Assert
self.assertBlobEqual(self.container_name, blob_name, data[:blob_size])
@ -1102,8 +1100,7 @@ class StoragePageBlobTest(StorageTestCase):
data = self.get_random_bytes(512)
# Act
self.bs.create_blob_from_bytes(self.container_name, blob_name, data,
validate_content=True)
self.bs.create_blob_from_bytes(self.container_name, blob_name, data, validate_content=True)
# Assert
@ -1117,8 +1114,7 @@ class StoragePageBlobTest(StorageTestCase):
data = self.get_random_bytes(LARGE_BLOB_SIZE)
# Act
self.bs.create_blob_from_bytes(self.container_name, blob_name, data,
validate_content=True)
self.bs.create_blob_from_bytes(self.container_name, blob_name, data, validate_content=True)
# Assert

Просмотреть файл

@ -507,63 +507,61 @@ class StorageFileTest(StorageTestCase):
@record
def test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes(self):
# Arrange
share_name = "sprasa-test"
source_file_name = 'testfile1'
self.fs.create_file(share_name, None, source_file_name, 2048)
self.fs.create_file(self.share_name, None, source_file_name, 2048)
data = b'abcdefghijklmnop' * 32
self.fs.update_range(share_name, None, source_file_name, data, 0, 511)
self.fs.update_range(self.share_name, None, source_file_name, data, 0, 511)
file_name = 'filetoupdate'
self.fs.create_file(share_name, None, file_name, 2048)
self.fs.create_file(self.share_name, None, file_name, 2048)
# generate SAS for the source file
sas_token_for_source_file = \
self.fs.generate_file_shared_access_signature(share_name,
self.fs.generate_file_shared_access_signature(self.share_name,
None,
source_file_name,
FilePermissions.READ,
expiry=datetime.utcnow() + timedelta(hours=1))
source_file_url = self.fs.make_file_url(share_name, None, source_file_name, sas_token=sas_token_for_source_file)
source_file_url = self.fs.make_file_url(self.share_name, None, source_file_name, sas_token=sas_token_for_source_file)
# Act
with self.assertRaises(AzureHttpError):
# when the source file has less bytes than 2050, throw exception
self.fs.update_range_from_file_url(share_name, None, file_name, 0, 2049, source_file_url,
self.fs.update_range_from_file_url(self.share_name, None, file_name, 0, 2049, source_file_url,
source_start_range=0)
@record
def test_update_range_from_file_url(self):
# Arrange
share_name = "sprasa-test"
source_file_name = 'testfile'
self.fs.create_file(share_name, None, source_file_name, 2048)
self.fs.create_file(self.share_name, None, source_file_name, 2048)
data = b'abcdefghijklmnop' * 32
self.fs.update_range(share_name, None, source_file_name, data, 0, 511)
self.fs.update_range(self.share_name, None, source_file_name, data, 0, 511)
file_name = 'filetoupdate'
self.fs.create_file(share_name, None, file_name, 2048)
self.fs.create_file(self.share_name, None, file_name, 2048)
# generate SAS for the source file
sas_token_for_source_file = \
self.fs.generate_file_shared_access_signature(share_name,
self.fs.generate_file_shared_access_signature(self.share_name,
None,
source_file_name,
FilePermissions.READ,
expiry=datetime.utcnow() + timedelta(hours=1))
source_file_url = self.fs.make_file_url(share_name, None, source_file_name, sas_token=sas_token_for_source_file)
source_file_url = self.fs.make_file_url(self.share_name, None, source_file_name, sas_token=sas_token_for_source_file)
# Act
self.fs.update_range_from_file_url(share_name, None, file_name, 0, 511, source_file_url,
self.fs.update_range_from_file_url(self.share_name, None, file_name, 0, 511, source_file_url,
source_start_range=0)
# Assert
# To make sure the range of the file is actually updated
file_ranges = self.fs.list_ranges(share_name, None, file_name)
file = self.fs.get_file_to_bytes(share_name, None, file_name, 0, 511)
file_ranges = self.fs.list_ranges(self.share_name, None, file_name)
file = self.fs.get_file_to_bytes(self.share_name, None, file_name, 0, 511)
self.assertEquals(1, len(file_ranges))
self.assertEquals(0, file_ranges[0].start)
self.assertEquals(511, file_ranges[0].end)
@ -572,35 +570,34 @@ class StorageFileTest(StorageTestCase):
@record
def test_update_big_range_from_file_url(self):
# Arrange
share_name = "sprasa-test"
source_file_name = 'testfile1'
end = 1048575
self.fs.create_file(share_name, None, source_file_name, 1024 * 1024)
self.fs.create_file(self.share_name, None, source_file_name, 1024 * 1024)
data = b'abcdefghijklmnop' * 65536
self.fs.update_range(share_name, None, source_file_name, data, 0, end)
self.fs.update_range(self.share_name, None, source_file_name, data, 0, end)
file_name = 'filetoupdate1'
self.fs.create_file(share_name, None, file_name, 1024 * 1024)
self.fs.create_file(self.share_name, None, file_name, 1024 * 1024)
# generate SAS for the source file
sas_token_for_source_file = \
self.fs.generate_file_shared_access_signature(share_name,
self.fs.generate_file_shared_access_signature(self.share_name,
None,
source_file_name,
FilePermissions.READ,
expiry=datetime.utcnow() + timedelta(hours=1))
source_file_url = self.fs.make_file_url(share_name, None, source_file_name, sas_token=sas_token_for_source_file)
source_file_url = self.fs.make_file_url(self.share_name, None, source_file_name, sas_token=sas_token_for_source_file)
# Act
self.fs.update_range_from_file_url(share_name, None, file_name, 0, end, source_file_url,
self.fs.update_range_from_file_url(self.share_name, None, file_name, 0, end, source_file_url,
source_start_range=0)
# Assert
# To make sure the range of the file is actually updated
file_ranges = self.fs.list_ranges(share_name, None, file_name)
file = self.fs.get_file_to_bytes(share_name, None, file_name, 0, end)
file_ranges = self.fs.list_ranges(self.share_name, None, file_name)
file = self.fs.get_file_to_bytes(self.share_name, None, file_name, 0, end)
self.assertEquals(1, len(file_ranges))
self.assertEquals(0, file_ranges[0].start)
self.assertEquals(end, file_ranges[0].end)

Просмотреть файл

@ -556,7 +556,7 @@ class StorageQueueTest(StorageTestCase):
token_credential = TokenCredential(self.generate_oauth_token())
# Action 1: make sure token works
service = QueueService(self.settings.OAUTH_STORAGE_ACCOUNT_NAME, token_credential=token_credential)
service = QueueService(self.settings.STORAGE_ACCOUNT_NAME, token_credential=token_credential)
queues = list(service.list_queues())
self.assertIsNotNone(queues)

Просмотреть файл

@ -240,7 +240,7 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 01:09:25 GMT']
x-ms-version: ['2018-11-09']
method: POST
uri: https://oauthstoragename.blob.core.windows.net/?restype=service&comp=userdelegationkey
uri: https://storagename.blob.core.windows.net/?restype=service&comp=userdelegationkey
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><UserDelegationKey><SignedOid>c4f48289-bb84-4086-b250-6f94a8f64cee</SignedOid><SignedTid>32f988bf-54f1-15af-36ab-2d7cd364db47</SignedTid><SignedStart>2019-05-09T01:09:24Z</SignedStart><SignedExpiry>2019-05-09T02:09:24Z</SignedExpiry><SignedService>b</SignedService><SignedVersion>2018-11-09</SignedVersion><Value>EWmKM9I+/Jw+fjBnol1OZBnboH5nE75XeUNiexypFPA=</Value></UserDelegationKey>"}
headers:
@ -300,7 +300,7 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 01:09:26 GMT']
x-ms-version: ['2018-11-09']
method: POST
uri: https://oauthstoragename.blob.core.windows.net/?restype=service&comp=userdelegationkey
uri: https://storagename.blob.core.windows.net/?restype=service&comp=userdelegationkey
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><UserDelegationKey><SignedOid>c4f48289-bb84-4086-b250-6f94a8f64cee</SignedOid><SignedTid>32f988bf-54f1-15af-36ab-2d7cd364db47</SignedTid><SignedStart>2019-05-09T01:09:24Z</SignedStart><SignedExpiry>2019-05-09T02:09:24Z</SignedExpiry><SignedService>b</SignedService><SignedVersion>2018-11-09</SignedVersion><Value>EWmKM9I+/Jw+fjBnol1OZBnboH5nE75XeUNiexypFPA=</Value></UserDelegationKey>"}
headers:

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -45,7 +45,7 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 00:56:30 GMT']
x-ms-version: ['2018-11-09']
method: GET
uri: https://oauthstoragename.blob.core.windows.net/test?restype=container
uri: https://storagename.blob.core.windows.net/test?restype=container
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>ContainerNotFound</Code><Message>The\
\ specified container does not exist.\nRequestId:f3d29326-501e-001b-0102-06ac38000000\n\
@ -68,7 +68,7 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 00:56:32 GMT']
x-ms-version: ['2018-11-09']
method: GET
uri: https://oauthstoragename.blob.core.windows.net/test?restype=container
uri: https://storagename.blob.core.windows.net/test?restype=container
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidAuthenticationInfo</Code><Message>Authentication\
\ information is not given in the correct format. Check the value of Authorization\
@ -128,7 +128,7 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 00:56:32 GMT']
x-ms-version: ['2018-11-09']
method: GET
uri: https://oauthstoragename.blob.core.windows.net/test?restype=container
uri: https://storagename.blob.core.windows.net/test?restype=container
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>ContainerNotFound</Code><Message>The\
\ specified container does not exist.\nRequestId:f3d2939f-501e-001b-7702-06ac38000000\n\

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -2,686 +2,190 @@ interactions:
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- ecdfe910-985e-11e9-8a74-001a7dda7113
x-ms-copy-source:
- https://stagesctewz1.file.core.windows.net/sprasa-test/testfile?se=2019-06-26T23%3A08%3A27Z&sp=r&sv=2019-02-02&sr=f&sig=fClZ3P8Q7pdAZWaeZN0l6bCuxcXnzYGeyW%2BW6OdrCnc%3D
x-ms-date:
- Wed, 26 Jun 2019 22:08:27 GMT
x-ms-range:
- bytes=0-511
x-ms-source-range:
- bytes=0-511
x-ms-version:
- '2019-02-02'
x-ms-write:
- update
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ad0a8092-b4c2-11e9-9070-f218981b70f8]
x-ms-content-length: ['2048']
x-ms-date: ['Fri, 02 Aug 2019 01:13:03 GMT']
x-ms-file-attributes: [Archive]
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-permission: [Inherit]
x-ms-type: [file]
x-ms-version: ['2019-02-02']
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate?comp=range
uri: https://storagename.file.core.windows.net/utshare5ed210c0/testfile
response:
body:
string: ''
body: {string: ''}
headers:
Content-Length:
- '0'
Date:
- Wed, 26 Jun 2019 22:08:28 GMT
ETag:
- '"0x8D6FA82D17BDC3A"'
Last-Modified:
- Wed, 26 Jun 2019 22:08:28 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-client-request-id:
- ecdfe910-985e-11e9-8a74-001a7dda7113
x-ms-content-crc64:
- EZA9hgZaRrQ=
x-ms-request-id:
- c4d70da6-101a-0025-706b-2c3b47000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2019-02-02'
status:
code: 201
message: Created
- request:
body: null
headers:
Connection:
- keep-alive
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- ed4df7be-985e-11e9-8035-001a7dda7113
x-ms-date:
- Wed, 26 Jun 2019 22:08:28 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate?comp=rangelist
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Ranges><Range><Start>0</Start><End>511</End></Range></Ranges>"
headers:
Content-Type:
- application/xml
Date:
- Wed, 26 Jun 2019 22:08:28 GMT
ETag:
- '"0x8D6FA82D17BDC3A"'
Last-Modified:
- Wed, 26 Jun 2019 22:08:28 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
Transfer-Encoding:
- chunked
x-ms-client-request-id:
- ed4df7be-985e-11e9-8035-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-request-id:
- c4d70dab-101a-0025-746b-2c3b47000000
x-ms-version:
- '2019-02-02'
status:
code: 200
message: OK
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 5efbe0be-985f-11e9-b40e-001a7dda7113
x-ms-copy-source:
- https://stagesctewz1.file.core.windows.net/sprasa-test/testfile?se=2019-06-26T23%3A11%3A39Z&sp=r&sv=2019-02-02&sr=f&sig=IZre3XNUJjeSlgCwj4kWXRlTBaqfaJPYmthl34cjmTs%3D
x-ms-date:
- Wed, 26 Jun 2019 22:11:39 GMT
x-ms-range:
- bytes=0-511
x-ms-source-range:
- bytes=0-511
x-ms-version:
- '2019-02-02'
x-ms-write:
- update
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate?comp=range
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Wed, 26 Jun 2019 22:11:39 GMT
ETag:
- '"0x8D6FA83437AF81B"'
Last-Modified:
- Wed, 26 Jun 2019 22:11:39 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-client-request-id:
- 5efbe0be-985f-11e9-b40e-001a7dda7113
x-ms-content-crc64:
- EZA9hgZaRrQ=
x-ms-request-id:
- ed14036e-f01a-002d-2e6c-2c2148000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2019-02-02'
status:
code: 201
message: Created
- request:
body: null
headers:
Connection:
- keep-alive
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 5f4dc3ec-985f-11e9-8aa6-001a7dda7113
x-ms-date:
- Wed, 26 Jun 2019 22:11:39 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate?comp=rangelist
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Ranges><Range><Start>0</Start><End>511</End></Range></Ranges>"
headers:
Content-Type:
- application/xml
Date:
- Wed, 26 Jun 2019 22:11:39 GMT
ETag:
- '"0x8D6FA83437AF81B"'
Last-Modified:
- Wed, 26 Jun 2019 22:11:39 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
Transfer-Encoding:
- chunked
x-ms-client-request-id:
- 5f4dc3ec-985f-11e9-8aa6-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-request-id:
- ed140374-f01a-002d-316c-2c2148000000
x-ms-version:
- '2019-02-02'
status:
code: 200
message: OK
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 146fcf12-a06c-11e9-8107-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Sun, 07 Jul 2019 04:02:47 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Sun, 07 Jul 2019 04:02:46 GMT
ETag:
- '"0x8D7028FF8D469CE"'
Last-Modified:
- Sun, 07 Jul 2019 04:02:47 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- b547648f-c01a-0026-4378-34da23000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
Content-Length: ['0']
Date: ['Fri, 02 Aug 2019 01:13:03 GMT']
ETag: ['"0x8D716E68C712FAA"']
Last-Modified: ['Fri, 02 Aug 2019 01:12:55 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ad0a8092-b4c2-11e9-9070-f218981b70f8]
x-ms-file-attributes: [Archive]
x-ms-file-change-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-id: ['13835128424026341376']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-parent-id: ['0']
x-ms-file-permission-key: [5068516693366841476*17218973682704664586]
x-ms-request-id: [42cf34b0-e01a-002f-2bcf-484e11000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2019-02-02']
status: {code: 201, message: Created}
- request:
body: abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnop
headers:
Connection:
- keep-alive
Content-Length:
- '512'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 14a7f902-a06c-11e9-b992-001a7dda7113
x-ms-date:
- Sun, 07 Jul 2019 04:02:47 GMT
x-ms-range:
- bytes=0-511
x-ms-version:
- '2018-11-09'
x-ms-write:
- update
Connection: [keep-alive]
Content-Length: ['512']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ad1e45a0-b4c2-11e9-9070-f218981b70f8]
x-ms-date: ['Fri, 02 Aug 2019 01:13:03 GMT']
x-ms-range: [bytes=0-511]
x-ms-version: ['2019-02-02']
x-ms-write: [update]
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile?comp=range
uri: https://storagename.file.core.windows.net/utshare5ed210c0/testfile?comp=range
response:
body:
string: ''
body: {string: ''}
headers:
Content-Length:
- '0'
Content-MD5:
- pTsTLZHyQ+et6NksJ1OHxg==
Date:
- Sun, 07 Jul 2019 04:02:47 GMT
ETag:
- '"0x8D7028FF8E2C1AD"'
Last-Modified:
- Sun, 07 Jul 2019 04:02:47 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- b5476499-c01a-0026-4d78-34da23000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
Content-Length: ['0']
Content-MD5: [pTsTLZHyQ+et6NksJ1OHxg==]
Date: ['Fri, 02 Aug 2019 01:13:03 GMT']
ETag: ['"0x8D716E691551464"']
Last-Modified: ['Fri, 02 Aug 2019 01:13:03 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ad1e45a0-b4c2-11e9-9070-f218981b70f8]
x-ms-request-id: [42cf34b2-e01a-002f-2ccf-484e11000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2019-02-02']
status: {code: 201, message: Created}
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 14b6950c-a06c-11e9-8a91-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Sun, 07 Jul 2019 04:02:47 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ad239ece-b4c2-11e9-9070-f218981b70f8]
x-ms-content-length: ['2048']
x-ms-date: ['Fri, 02 Aug 2019 01:13:03 GMT']
x-ms-file-attributes: [Archive]
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-permission: [Inherit]
x-ms-type: [file]
x-ms-version: ['2019-02-02']
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate
uri: https://storagename.file.core.windows.net/utshare5ed210c0/filetoupdate
response:
body:
string: ''
body: {string: ''}
headers:
Content-Length:
- '0'
Date:
- Sun, 07 Jul 2019 04:02:47 GMT
ETag:
- '"0x8D7028FF8F167A8"'
Last-Modified:
- Sun, 07 Jul 2019 04:02:47 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- b547649e-c01a-0026-5278-34da23000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
Content-Length: ['0']
Date: ['Fri, 02 Aug 2019 01:13:03 GMT']
ETag: ['"0x8D716E68C712FAA"']
Last-Modified: ['Fri, 02 Aug 2019 01:12:55 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ad239ece-b4c2-11e9-9070-f218981b70f8]
x-ms-file-attributes: [Archive]
x-ms-file-change-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-id: ['11529285414812647424']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-parent-id: ['0']
x-ms-file-permission-key: [5068516693366841476*17218973682704664586]
x-ms-request-id: [42cf34b3-e01a-002f-2dcf-484e11000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2019-02-02']
status: {code: 201, message: Created}
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- a93e46be-a06d-11e9-b046-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Sun, 07 Jul 2019 04:14:06 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ad2a3342-b4c2-11e9-9070-f218981b70f8]
x-ms-copy-source: ['https://zemaintest.file.core.windows.net/utshare5ed210c0/testfile?se=2019-08-02T02%3A13%3A03Z&sp=r&sv=2019-02-02&sr=f&sig=ZfsanYQ2doxCoxW91JVZoiifT%2BcHQLzqi0Rby6Un5K8%3D']
x-ms-date: ['Fri, 02 Aug 2019 01:13:03 GMT']
x-ms-range: [bytes=0-511]
x-ms-source-range: [bytes=0-511]
x-ms-version: ['2019-02-02']
x-ms-write: [update]
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile
uri: https://storagename.file.core.windows.net/utshare5ed210c0/filetoupdate?comp=range
response:
body:
string: ''
body: {string: ''}
headers:
Content-Length:
- '0'
Date:
- Sun, 07 Jul 2019 04:14:05 GMT
ETag:
- '"0x8D702918DA37510"'
Last-Modified:
- Sun, 07 Jul 2019 04:14:06 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- 8e463378-b01a-002c-1e7a-347e94000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
- request:
body: abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnop
headers:
Connection:
- keep-alive
Content-Length:
- '512'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- a977875e-a06d-11e9-a6bc-001a7dda7113
x-ms-date:
- Sun, 07 Jul 2019 04:14:06 GMT
x-ms-range:
- bytes=0-511
x-ms-version:
- '2018-11-09'
x-ms-write:
- update
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile?comp=range
response:
body:
string: ''
headers:
Content-Length:
- '0'
Content-MD5:
- pTsTLZHyQ+et6NksJ1OHxg==
Date:
- Sun, 07 Jul 2019 04:14:05 GMT
ETag:
- '"0x8D702918DB1CD0A"'
Last-Modified:
- Sun, 07 Jul 2019 04:14:06 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- 8e463379-b01a-002c-1f7a-347e94000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
Content-Length: ['0']
Date: ['Fri, 02 Aug 2019 01:13:04 GMT']
ETag: ['"0x8D716E692041CFC"']
Last-Modified: ['Fri, 02 Aug 2019 01:13:04 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ad2a3342-b4c2-11e9-9070-f218981b70f8]
x-ms-content-crc64: [EZA9hgZaRrQ=]
x-ms-request-id: [42cf34b4-e01a-002f-2ecf-484e11000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2019-02-02']
status: {code: 201, message: Created}
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- a9862eee-a06d-11e9-a66f-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Sun, 07 Jul 2019 04:14:06 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Sun, 07 Jul 2019 04:14:06 GMT
ETag:
- '"0x8D702918DC30B1A"'
Last-Modified:
- Sun, 07 Jul 2019 04:14:06 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- 8e46337b-b01a-002c-217a-347e94000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- c314fad4-a06d-11e9-b72b-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Sun, 07 Jul 2019 04:14:49 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Sun, 07 Jul 2019 04:14:49 GMT
ETag:
- '"0x8D70291A77C5360"'
Last-Modified:
- Sun, 07 Jul 2019 04:14:49 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- 587e715f-d01a-0015-597a-348588000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
- request:
body: abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnop
headers:
Connection:
- keep-alive
Content-Length:
- '512'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- c350a780-a06d-11e9-a1f9-001a7dda7113
x-ms-date:
- Sun, 07 Jul 2019 04:14:50 GMT
x-ms-range:
- bytes=0-511
x-ms-version:
- '2018-11-09'
x-ms-write:
- update
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile?comp=range
response:
body:
string: ''
headers:
Content-Length:
- '0'
Content-MD5:
- pTsTLZHyQ+et6NksJ1OHxg==
Date:
- Sun, 07 Jul 2019 04:14:49 GMT
ETag:
- '"0x8D70291A78D916E"'
Last-Modified:
- Sun, 07 Jul 2019 04:14:50 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- 587e7167-d01a-0015-607a-348588000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- c361e8de-a06d-11e9-b3ef-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Sun, 07 Jul 2019 04:14:50 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate
response:
body:
string: ''
headers:
Content-Length:
- '0'
Date:
- Sun, 07 Jul 2019 04:14:49 GMT
ETag:
- '"0x8D70291A79D9712"'
Last-Modified:
- Sun, 07 Jul 2019 04:14:50 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- 587e716d-d01a-0015-667a-348588000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- c371d654-a06d-11e9-b30d-001a7dda7113
x-ms-copy-source:
- https://stagesctewz1.file.core.windows.net/sprasa-test/testfile?se=2019-07-07T05%3A14%3A50Z&sp=r&sv=2018-11-09&sr=f&sig=IKIgpcWB7oDjPUZH7xbBWUcKuXAzW6HIa9Q3/sfiqnc%3D
x-ms-date:
- Sun, 07 Jul 2019 04:14:50 GMT
x-ms-range:
- bytes=0-511
x-ms-source-range:
- bytes=0-511
x-ms-version:
- '2018-11-09'
x-ms-write:
- update
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate?comp=range
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidHeaderValue</Code><Message>The
value for one of the HTTP headers is not in the correct format.\nRequestId:587e7172-d01a-0015-6b7a-348588000000\nTime:2019-07-07T04:14:50.2763250Z</Message><HeaderName>Content-Length</HeaderName><HeaderValue>0</HeaderValue></Error>"
headers:
Content-Length:
- '321'
Content-Type:
- application/xml
Date:
- Sun, 07 Jul 2019 04:14:49 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-error-code:
- InvalidHeaderValue
x-ms-request-id:
- 587e7172-d01a-0015-6b7a-348588000000
x-ms-version:
- '2018-11-09'
status:
code: 400
message: The value for one of the HTTP headers is not in the correct format.
- request:
body: null
headers:
Connection:
- keep-alive
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 3deb694c-a072-11e9-87a5-001a7dda7113
x-ms-date:
- Sun, 07 Jul 2019 04:46:53 GMT
x-ms-range:
- bytes=0-511
x-ms-version:
- '2018-11-09'
Connection: [keep-alive]
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ade15234-b4c2-11e9-9070-f218981b70f8]
x-ms-date: ['Fri, 02 Aug 2019 01:13:04 GMT']
x-ms-version: ['2019-02-02']
method: GET
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate
uri: https://storagename.file.core.windows.net/utshare5ed210c0/filetoupdate?comp=rangelist
response:
body:
string: abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnop
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Ranges><Range><Start>0</Start><End>511</End></Range></Ranges>"}
headers:
Accept-Ranges:
- bytes
Content-Length:
- '512'
Content-Range:
- bytes 0-511/2048
Content-Type:
- application/octet-stream
Date:
- Sun, 07 Jul 2019 04:46:53 GMT
ETag:
- '"0x8D702959D130857"'
Last-Modified:
- Sun, 07 Jul 2019 04:43:10 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- 588014f6-d01a-0015-247e-348588000000
x-ms-server-encrypted:
- 'true'
x-ms-type:
- File
x-ms-version:
- '2018-11-09'
status:
code: 206
message: Partial Content
Content-Type: [application/xml]
Date: ['Fri, 02 Aug 2019 01:13:04 GMT']
ETag: ['"0x8D716E692041CFC"']
Last-Modified: ['Fri, 02 Aug 2019 01:13:04 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-client-request-id: [ade15234-b4c2-11e9-9070-f218981b70f8]
x-ms-content-length: ['2048']
x-ms-request-id: [42cf34b7-e01a-002f-2fcf-484e11000000]
x-ms-version: ['2019-02-02']
status: {code: 200, message: OK}
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ade6487a-b4c2-11e9-9070-f218981b70f8]
x-ms-date: ['Fri, 02 Aug 2019 01:13:04 GMT']
x-ms-range: [bytes=0-511]
x-ms-version: ['2019-02-02']
method: GET
uri: https://storagename.file.core.windows.net/utshare5ed210c0/filetoupdate
response:
body: {string: abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnop}
headers:
Accept-Ranges: [bytes]
Content-Length: ['512']
Content-Range: [bytes 0-511/2048]
Content-Type: [application/octet-stream]
Date: ['Fri, 02 Aug 2019 01:13:04 GMT']
ETag: ['"0x8D716E692041CFC"']
Last-Modified: ['Fri, 02 Aug 2019 01:13:04 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ade6487a-b4c2-11e9-9070-f218981b70f8]
x-ms-file-attributes: [Archive]
x-ms-file-change-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-id: ['11529285414812647424']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-parent-id: ['0']
x-ms-file-permission-key: [5068516693366841476*17218973682704664586]
x-ms-request-id: [42cf34b8-e01a-002f-30cf-484e11000000]
x-ms-server-encrypted: ['true']
x-ms-type: [File]
x-ms-version: ['2019-02-02']
status: {code: 206, message: Partial Content}
version: 1

Просмотреть файл

@ -2,186 +2,132 @@ interactions:
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 690ea92e-a3ab-11e9-b37e-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Thu, 11 Jul 2019 07:13:40 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ae2bc878-b4c2-11e9-9070-f218981b70f8]
x-ms-content-length: ['2048']
x-ms-date: ['Fri, 02 Aug 2019 01:13:05 GMT']
x-ms-file-attributes: [Archive]
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-permission: [Inherit]
x-ms-type: [file]
x-ms-version: ['2019-02-02']
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile1
uri: https://storagename.file.core.windows.net/utshared73322e8/testfile1
response:
body:
string: ''
body: {string: ''}
headers:
Content-Length:
- '0'
Date:
- Thu, 11 Jul 2019 07:13:40 GMT
ETag:
- '"0x8D705CF4D8AA2FA"'
Last-Modified:
- Thu, 11 Jul 2019 07:13:41 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- ec63a3f7-401a-0007-78b8-37fe58000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
Content-Length: ['0']
Date: ['Fri, 02 Aug 2019 01:13:04 GMT']
ETag: ['"0x8D716E68C712FAA"']
Last-Modified: ['Fri, 02 Aug 2019 01:12:55 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ae2bc878-b4c2-11e9-9070-f218981b70f8]
x-ms-file-attributes: [Archive]
x-ms-file-change-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-id: ['13835128424026341376']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-parent-id: ['0']
x-ms-file-permission-key: [5068516693366841476*17218973682704664586]
x-ms-request-id: [4a148a33-c01a-0038-4ccf-488e72000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2019-02-02']
status: {code: 201, message: Created}
- request:
body: abcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnopabcdefghijklmnop
headers:
Connection:
- keep-alive
Content-Length:
- '512'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 69649e0c-a3ab-11e9-b46e-001a7dda7113
x-ms-date:
- Thu, 11 Jul 2019 07:13:41 GMT
x-ms-range:
- bytes=0-511
x-ms-version:
- '2018-11-09'
x-ms-write:
- update
Connection: [keep-alive]
Content-Length: ['512']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ae3fdd68-b4c2-11e9-9070-f218981b70f8]
x-ms-date: ['Fri, 02 Aug 2019 01:13:05 GMT']
x-ms-range: [bytes=0-511]
x-ms-version: ['2019-02-02']
x-ms-write: [update]
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/testfile1?comp=range
uri: https://storagename.file.core.windows.net/utshared73322e8/testfile1?comp=range
response:
body:
string: ''
body: {string: ''}
headers:
Content-Length:
- '0'
Content-MD5:
- pTsTLZHyQ+et6NksJ1OHxg==
Date:
- Thu, 11 Jul 2019 07:13:40 GMT
ETag:
- '"0x8D705CF4DA0E9F2"'
Last-Modified:
- Thu, 11 Jul 2019 07:13:41 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- ec63a3fb-401a-0007-7bb8-37fe58000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
Content-Length: ['0']
Content-MD5: [pTsTLZHyQ+et6NksJ1OHxg==]
Date: ['Fri, 02 Aug 2019 01:13:04 GMT']
ETag: ['"0x8D716E692771F18"']
Last-Modified: ['Fri, 02 Aug 2019 01:13:05 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ae3fdd68-b4c2-11e9-9070-f218981b70f8]
x-ms-request-id: [4a148a35-c01a-0038-4dcf-488e72000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2019-02-02']
status: {code: 201, message: Created}
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 6973eab6-a3ab-11e9-8a65-001a7dda7113
x-ms-content-length:
- '2048'
x-ms-date:
- Thu, 11 Jul 2019 07:13:41 GMT
x-ms-type:
- file
x-ms-version:
- '2018-11-09'
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ae456418-b4c2-11e9-9070-f218981b70f8]
x-ms-content-length: ['2048']
x-ms-date: ['Fri, 02 Aug 2019 01:13:05 GMT']
x-ms-file-attributes: [Archive]
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-permission: [Inherit]
x-ms-type: [file]
x-ms-version: ['2019-02-02']
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate
uri: https://storagename.file.core.windows.net/utshared73322e8/filetoupdate
response:
body:
string: ''
body: {string: ''}
headers:
Content-Length:
- '0'
Date:
- Thu, 11 Jul 2019 07:13:40 GMT
ETag:
- '"0x8D705CF4DAF6AD6"'
Last-Modified:
- Thu, 11 Jul 2019 07:13:41 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id:
- ec63a3fd-401a-0007-7cb8-37fe58000000
x-ms-request-server-encrypted:
- 'true'
x-ms-version:
- '2018-11-09'
status:
code: 201
message: Created
Content-Length: ['0']
Date: ['Fri, 02 Aug 2019 01:13:04 GMT']
ETag: ['"0x8D716E68C712FAA"']
Last-Modified: ['Fri, 02 Aug 2019 01:12:55 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ae456418-b4c2-11e9-9070-f218981b70f8]
x-ms-file-attributes: [Archive]
x-ms-file-change-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-creation-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-id: ['11529285414812647424']
x-ms-file-last-write-time: ['2019-08-02T01:12:55.0731690Z']
x-ms-file-parent-id: ['0']
x-ms-file-permission-key: [5068516693366841476*17218973682704664586]
x-ms-request-id: [4a148a36-c01a-0038-4ecf-488e72000000]
x-ms-request-server-encrypted: ['true']
x-ms-version: ['2019-02-02']
status: {code: 201, message: Created}
- request:
body: null
headers:
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- Azure-Storage/2.0.0-2.0.1 (Python CPython 3.7.3; Windows 10)
x-ms-client-request-id:
- 9c6b5f00-a3ab-11e9-995c-001a7dda7113
x-ms-copy-source:
- https://stagesctewz1.file.core.windows.net/sprasa-test/testfile1?se=2019-07-11T08%3A15%3A07Z&sp=r&sv=2019-02-02&sr=f&sig=U1DmE8l71K%2BfbpNOLw8qcepkgjDVhCBp5EwE3lKfdcU%3D
x-ms-date:
- Thu, 11 Jul 2019 07:15:07 GMT
x-ms-range:
- bytes=0-2049
x-ms-source-range:
- bytes=0-2049
x-ms-version:
- '2019-02-02'
x-ms-write:
- update
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/2.1.0-2.1.0 (Python CPython 3.7.0; Darwin 18.7.0)]
x-ms-client-request-id: [ae4e12ca-b4c2-11e9-9070-f218981b70f8]
x-ms-copy-source: ['https://zemaintest.file.core.windows.net/utshared73322e8/testfile1?se=2019-08-02T02%3A13%3A05Z&sp=r&sv=2019-02-02&sr=f&sig=O75L8C152sdu2ZgHMZgPNKiM9tf%2BAe70h4uhFq/FoTE%3D']
x-ms-date: ['Fri, 02 Aug 2019 01:13:05 GMT']
x-ms-range: [bytes=0-2049]
x-ms-source-range: [bytes=0-2049]
x-ms-version: ['2019-02-02']
x-ms-write: [update]
method: PUT
uri: https://storagename.file.core.windows.net/sprasa-test/filetoupdate?comp=range
uri: https://storagename.file.core.windows.net/utshared73322e8/filetoupdate?comp=range
response:
body:
string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>CannotVerifyCopySource</Code><Message>The
source request body for copy source does not match requested length to write
on target.\nRequestId:ff77f469-401a-0028-2ab8-37f393000000\nTime:2019-07-11T07:15:07.8504939Z</Message></Error>"
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>CannotVerifyCopySource</Code><Message>The\
\ source request body for copy source does not match requested length to write\
\ on target.\nRequestId:4a148a37-c01a-0038-4fcf-488e72000000\nTime:2019-08-02T01:13:05.4303289Z</Message></Error>"}
headers:
Content-Length:
- '282'
Content-Type:
- application/xml
Date:
- Thu, 11 Jul 2019 07:15:06 GMT
Server:
- Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0
x-ms-client-request-id:
- 9c6b5f00-a3ab-11e9-995c-001a7dda7113
x-ms-error-code:
- CannotVerifyCopySource
x-ms-request-id:
- ff77f469-401a-0028-2ab8-37f393000000
x-ms-version:
- '2019-02-02'
status:
code: 409
message: The source request body for copy source does not match requested length
to write on target.
Content-Length: ['282']
Content-Type: [application/xml]
Date: ['Fri, 02 Aug 2019 01:13:04 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-client-request-id: [ae4e12ca-b4c2-11e9-9070-f218981b70f8]
x-ms-error-code: [CannotVerifyCopySource]
x-ms-request-id: [4a148a37-c01a-0038-4fcf-488e72000000]
x-ms-version: ['2019-02-02']
status: {code: 409, message: The source request body for copy source does not
match requested length to write on target.}
version: 1

Просмотреть файл

@ -45,10 +45,10 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 01:19:57 GMT']
x-ms-version: ['2018-03-28']
method: GET
uri: https://oauthstoragename.queue.core.windows.net/?comp=list
uri: https://storagename.queue.core.windows.net/?comp=list
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults\
\ ServiceEndpoint=\"https://oauthstoragename.queue.core.windows.net/\"><Queues><Queue><Name>queue266ac0d6455d4c249e2a5aaee0e941d9</Name></Queue></Queues><NextMarker\
\ ServiceEndpoint=\"https://storagename.queue.core.windows.net/\"><Queues><Queue><Name>queue266ac0d6455d4c249e2a5aaee0e941d9</Name></Queue></Queues><NextMarker\
\ /></EnumerationResults>"}
headers:
Cache-Control: [no-cache]
@ -68,7 +68,7 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 01:20:07 GMT']
x-ms-version: ['2018-03-28']
method: GET
uri: https://oauthstoragename.queue.core.windows.net/?comp=list
uri: https://storagename.queue.core.windows.net/?comp=list
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><Error><Code>InvalidAuthenticationInfo</Code><Message>Authentication\
\ information is not given in the correct format. Check the value of Authorization\
@ -128,10 +128,10 @@ interactions:
x-ms-date: ['Thu, 09 May 2019 01:20:08 GMT']
x-ms-version: ['2018-03-28']
method: GET
uri: https://oauthstoragename.queue.core.windows.net/?comp=list
uri: https://storagename.queue.core.windows.net/?comp=list
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults\
\ ServiceEndpoint=\"https://oauthstoragename.queue.core.windows.net/\"><Queues><Queue><Name>queue266ac0d6455d4c249e2a5aaee0e941d9</Name></Queue></Queues><NextMarker\
\ ServiceEndpoint=\"https://storagename.queue.core.windows.net/\"><Queues><Queue><Name>queue266ac0d6455d4c249e2a5aaee0e941d9</Name></Queue></Queues><NextMarker\
\ /></EnumerationResults>"}
headers:
Cache-Control: [no-cache]

Просмотреть файл

@ -0,0 +1,49 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [b51368fa-6d71-11e9-949b-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 07:04:34 GMT']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test?comp=listhandles
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Entries><Handle><HandleId>21129680188</HandleId><Path>foo2.txt</Path><FileId>12682214616000888832</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 06:59:59 GMT</OpenTime></Handle><Handle><HandleId>21129680656</HandleId><Path>wut/bla1.txt</Path><FileId>17293900634428276736</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 07:00:18 GMT</OpenTime></Handle><Handle><HandleId>21129680100</HandleId><Path>wut/foo1.txt</Path><FileId>14988057625214582784</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 06:59:55 GMT</OpenTime></Handle></Entries><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Fri, 03 May 2019 07:04:34 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [1a653936-201a-001b-1a7e-01e1b9000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
- request:
body: null
headers:
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [b5628c50-6d71-11e9-949b-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 07:04:35 GMT']
x-ms-handle-id: ['*']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: PUT
uri: https://storagename.file.core.windows.net/test?comp=forceclosehandles
response:
body: {string: ''}
headers:
Content-Length: ['0']
Date: ['Fri, 03 May 2019 07:04:35 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-number-of-handles-closed: ['3']
x-ms-request-id: [1a65393a-201a-001b-1b7e-01e1b9000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
version: 1

Просмотреть файл

@ -0,0 +1,50 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [6d97f07c-6d71-11e9-9951-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 07:02:34 GMT']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test?comp=listhandles
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Entries><Handle><HandleId>21129684298</HandleId><Path\
\ /><FileId>0</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 07:01:34 GMT</OpenTime></Handle><Handle><HandleId>21129680188</HandleId><Path>foo2.txt</Path><FileId>12682214616000888832</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 06:59:59 GMT</OpenTime></Handle><Handle><HandleId>21129680656</HandleId><Path>wut/bla1.txt</Path><FileId>17293900634428276736</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 07:00:18 GMT</OpenTime></Handle><Handle><HandleId>21129680100</HandleId><Path>wut/foo1.txt</Path><FileId>14988057625214582784</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 06:59:55 GMT</OpenTime></Handle></Entries><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Fri, 03 May 2019 07:02:35 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [9ed7aaf9-801a-001d-287e-0116c1000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
- request:
body: null
headers:
Connection: [keep-alive]
Content-Length: ['0']
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [6e1b9e18-6d71-11e9-9951-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 07:02:35 GMT']
x-ms-handle-id: ['21129684298']
x-ms-version: ['2018-11-09']
method: PUT
uri: https://storagename.file.core.windows.net/test?comp=forceclosehandles
response:
body: {string: ''}
headers:
Content-Length: ['0']
Date: ['Fri, 03 May 2019 07:02:35 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
x-ms-number-of-handles-closed: ['1']
x-ms-request-id: [9ed7aafc-801a-001d-297e-0116c1000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
version: 1

Просмотреть файл

@ -0,0 +1,46 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [b1e5f9ca-71e7-11e9-9256-acde48001122]
x-ms-date: ['Wed, 08 May 2019 23:19:14 GMT']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test/wut?comp=listhandles
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Entries><Handle><HandleId>21515836371</HandleId><Path>wut/bla.text</Path><FileId>9223414917808259072</FileId><ParentId>11529308504556830720</ParentId><SessionId>9435289398791897169</SessionId><ClientIp>167.220.2.92:14118</ClientIp><OpenTime>Wed,\
\ 08 May 2019 23:14:47 GMT</OpenTime></Handle></Entries><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Wed, 08 May 2019 23:19:14 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [8811ff12-e01a-0024-77f4-055665000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [b20faa22-71e7-11e9-9256-acde48001122]
x-ms-date: ['Wed, 08 May 2019 23:19:15 GMT']
x-ms-recursive: ['False']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test/wut?comp=listhandles
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Entries\
\ /><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Wed, 08 May 2019 23:19:14 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [8811ff15-e01a-0024-78f4-055665000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
version: 1

Просмотреть файл

@ -0,0 +1,23 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [5a6e7ecc-6d6b-11e9-8802-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 06:19:05 GMT']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test/wut/bla.txt?comp=listhandles
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Entries><Handle><HandleId>21123902372</HandleId><Path>wut/bla.txt</Path><FileId>13835136120607735808</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 04:52:31 GMT</OpenTime></Handle></Entries><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Fri, 03 May 2019 06:19:05 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [6f1b3437-701a-0008-5478-01d458000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
version: 1

Просмотреть файл

@ -0,0 +1,30 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [5ab29cec-6d6b-11e9-8802-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 06:19:06 GMT']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test?comp=listhandles
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Entries><Handle><HandleId>21123954401</HandleId><Path\
\ /><FileId>0</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:59:43 GMT</OpenTime></Handle><Handle><HandleId>21123954403</HandleId><Path\
\ /><FileId>0</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:59:43 GMT</OpenTime></Handle><Handle><HandleId>21123950307</HandleId><Path>foo.txt</Path><FileId>11529293111394041856</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:57:25 GMT</OpenTime></Handle><Handle><HandleId>21123902372</HandleId><Path>wut/bla.txt</Path><FileId>13835136120607735808</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 04:52:31 GMT</OpenTime></Handle><Handle><HandleId>21123950645</HandleId><Path>wut/foo.txt</Path><FileId>9223450102180347904</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:57:45 GMT</OpenTime></Handle></Entries><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Fri, 03 May 2019 06:19:06 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [5e4b5215-301a-0040-2378-01e6c5000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
version: 1

Просмотреть файл

@ -0,0 +1,25 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [0166e1e2-71ea-11e9-9eaf-acde48001122]
x-ms-date: ['Wed, 08 May 2019 23:35:47 GMT']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test?comp=listhandles&sharesnapshot=2019-05-08T23%3A27%3A24.0000000Z
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Entries><Handle><HandleId>21515839124</HandleId><Path>wut</Path><FileId>11529308504556830720</FileId><ParentId>0</ParentId><SessionId>9435289398791897169</SessionId><ClientIp>167.220.2.92:14118</ClientIp><OpenTime>Wed,\
\ 08 May 2019 23:32:16 GMT</OpenTime></Handle><Handle><HandleId>21515839125</HandleId><Path>wut</Path><FileId>11529308504556830720</FileId><ParentId>0</ParentId><SessionId>9435289398791897169</SessionId><ClientIp>167.220.2.92:14118</ClientIp><OpenTime>Wed,\
\ 08 May 2019 23:32:17 GMT</OpenTime></Handle></Entries><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Wed, 08 May 2019 23:35:47 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [d7453674-901a-002b-1bf6-05bb93000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
version: 1

Просмотреть файл

@ -0,0 +1,51 @@
interactions:
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [5aea13e8-6d6b-11e9-8802-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 06:19:06 GMT']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test?comp=listhandles&maxresults=1
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><MaxResults>1</MaxResults><Entries><Handle><HandleId>21123954401</HandleId><Path\
\ /><FileId>0</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:59:43 GMT</OpenTime></Handle></Entries><NextMarker>1!300!cEFBQUFBRUFBd0FIQUFBQUFBQUFBRFlBQUFCZ0FBQUFaQUFBQUd3QUFBQjBBQUFBZEFBQUFId0FBQUI2QUdVQWJRQmhBR2tBYmdCMEFHVUFjd0IwQUFFQU1BQXhBRVFBTkFBM0FEWUFSUUEwQURVQU9BQTFBRGtBTndBd0FEQUFOZ0IwQUdVQWN3QjBBQUVBTUFBeEFFUUFOQUJFQURBQU1BQkVBRUlBUWdBekFEQUFOZ0JGQURrQU1nQUJBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT1AyRmVzRUFBQUE-</NextMarker></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Fri, 03 May 2019 06:19:06 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [51fed312-901a-0046-0778-0111bd000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
- request:
body: null
headers:
Connection: [keep-alive]
User-Agent: [Azure-Storage/1.4.0-1.4.0 (Python CPython 3.7.0; Darwin 18.5.0)]
x-ms-client-request-id: [5b1fb6e2-6d6b-11e9-8802-f218981b70f8]
x-ms-date: ['Fri, 03 May 2019 06:19:06 GMT']
x-ms-recursive: ['True']
x-ms-version: ['2018-11-09']
method: GET
uri: https://storagename.file.core.windows.net/test?comp=listhandles&marker=1%21300%21cEFBQUFBRUFBd0FIQUFBQUFBQUFBRFlBQUFCZ0FBQUFaQUFBQUd3QUFBQjBBQUFBZEFBQUFId0FBQUI2QUdVQWJRQmhBR2tBYmdCMEFHVUFjd0IwQUFFQU1BQXhBRVFBTkFBM0FEWUFSUUEwQURVQU9BQTFBRGtBTndBd0FEQUFOZ0IwQUdVQWN3QjBBQUVBTUFBeEFFUUFOQUJFQURBQU1BQkVBRUlBUWdBekFEQUFOZ0JGQURrQU1nQUJBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT1AyRmVzRUFBQUE-
response:
body: {string: "\uFEFF<?xml version=\"1.0\" encoding=\"utf-8\"?><EnumerationResults><Marker>1!300!cEFBQUFBRUFBd0FIQUFBQUFBQUFBRFlBQUFCZ0FBQUFaQUFBQUd3QUFBQjBBQUFBZEFBQUFId0FBQUI2QUdVQWJRQmhBR2tBYmdCMEFHVUFjd0IwQUFFQU1BQXhBRVFBTkFBM0FEWUFSUUEwQURVQU9BQTFBRGtBTndBd0FEQUFOZ0IwQUdVQWN3QjBBQUVBTUFBeEFFUUFOQUJFQURBQU1BQkVBRUlBUWdBekFEQUFOZ0JGQURrQU1nQUJBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT1AyRmVzRUFBQUE-</Marker><Entries><Handle><HandleId>21123954403</HandleId><Path\
\ /><FileId>0</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:59:43 GMT</OpenTime></Handle><Handle><HandleId>21123950307</HandleId><Path>foo.txt</Path><FileId>11529293111394041856</FileId><ParentId>0</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:57:25 GMT</OpenTime></Handle><Handle><HandleId>21123902372</HandleId><Path>wut/bla.txt</Path><FileId>13835136120607735808</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 04:52:31 GMT</OpenTime></Handle><Handle><HandleId>21123950645</HandleId><Path>wut/foo.txt</Path><FileId>9223450102180347904</FileId><ParentId>11529308504556830720</ParentId><SessionId>9385737614310506553</SessionId><ClientIp>167.220.2.92:27553</ClientIp><OpenTime>Fri,\
\ 03 May 2019 05:57:45 GMT</OpenTime></Handle></Entries><NextMarker /></EnumerationResults>"}
headers:
Content-Type: [application/xml]
Date: ['Fri, 03 May 2019 06:19:06 GMT']
Server: [Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0]
Transfer-Encoding: [chunked]
x-ms-request-id: [51fed315-901a-0046-0878-0111bd000000]
x-ms-version: ['2018-11-09']
status: {code: 200, message: OK}
version: 1

Просмотреть файл

@ -15,8 +15,6 @@ REMOTE_STORAGE_ACCOUNT_NAME = "remotestoragename"
REMOTE_STORAGE_ACCOUNT_KEY = "3pJwX7wjxoQEW2nKAhJZARpQWpKvPOUN9JwoV/HhlMmJlS1pORhzzHpPfQqgFcwGsriu6dwYqnugWOjGShC5VQ=="
PREMIUM_STORAGE_ACCOUNT_NAME = "premiumstoragename"
PREMIUM_STORAGE_ACCOUNT_KEY = "NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg=="
OAUTH_STORAGE_ACCOUNT_NAME = "oauthstoragename"
OAUTH_STORAGE_ACCOUNT_KEY = "XBB/YoZ41bDFBW1VcgCBNYmA1PDlc3NvQQaCk2rb/JtBoMBlekznQwAzDJHvZO1gJmCh8CUT12Gv3aCkWaDeGA=="
# Configurations related to Active Directory, which is used to obtain a token credential
ACTIVE_DIRECTORY_APPLICATION_ID = "68390a19-a897-236b-b453-488abf67b4fc"

Просмотреть файл

@ -304,8 +304,6 @@ class StorageTestCase(unittest.TestCase):
old_to_new_dict = {
self.settings.STORAGE_ACCOUNT_NAME: self.fake_settings.STORAGE_ACCOUNT_NAME,
self.settings.STORAGE_ACCOUNT_KEY: self.fake_settings.STORAGE_ACCOUNT_KEY,
self.settings.OAUTH_STORAGE_ACCOUNT_NAME: self.fake_settings.OAUTH_STORAGE_ACCOUNT_NAME,
self.settings.OAUTH_STORAGE_ACCOUNT_KEY: self.fake_settings.OAUTH_STORAGE_ACCOUNT_KEY,
self.settings.BLOB_STORAGE_ACCOUNT_NAME: self.fake_settings.BLOB_STORAGE_ACCOUNT_NAME,
self.settings.BLOB_STORAGE_ACCOUNT_KEY: self.fake_settings.BLOB_STORAGE_ACCOUNT_KEY,
self.settings.REMOTE_STORAGE_ACCOUNT_KEY: self.fake_settings.REMOTE_STORAGE_ACCOUNT_KEY,