Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
512d5a4
[File][RestParity]Rest Parity Sync
xiafu-msft Aug 29, 2019
8bed721
[File][RestParity]Rest Parity Async
xiafu-msft Aug 29, 2019
22b801a
[File][RestParity]Add Rest Parity Async Recording Files
xiafu-msft Aug 29, 2019
bfd3fbd
[File][RestParity]Fix CI
xiafu-msft Sep 6, 2019
7707acf
[File][RestParity]Recording again to fix CI
xiafu-msft Sep 6, 2019
e945a70
Add Generated Code
xiafu-msft Sep 6, 2019
8c821a6
Stylistic Things and Record
xiafu-msft Sep 6, 2019
8c5c22c
[Swagger][BugFix]workaround to fix swagger generated code
xiafu-msft Sep 9, 2019
d46e3dc
[File][RestParity]Add Create_Permission API and Test
xiafu-msft Sep 9, 2019
fcf0ec6
Fix Test
xiafu-msft Sep 9, 2019
3c6b3e0
Fix Pylint
xiafu-msft Sep 9, 2019
62dc377
Revert the workaround
xiafu-msft Sep 9, 2019
3d00c52
[File][RestParity]Tweak Documentation and Tests
xiafu-msft Sep 9, 2019
9afed1d
delete .dat file
xiafu-msft Sep 9, 2019
bd9f32e
[File][RestParity]Rest Parity Async
xiafu-msft Aug 29, 2019
99a07ad
[Blob][IdentitySAS]Add Identity SAS
xiafu-msft Aug 30, 2019
e7811c1
[Blob][IdentitySAS]Stylistic Things
xiafu-msft Sep 9, 2019
a565b90
[Blob][IdentitySAS]Stylistic Things
xiafu-msft Sep 9, 2019
aed02d4
[Blob][IdentitySAS]Add account_name parameter
xiafu-msft Sep 9, 2019
17540b4
Fix Pylint
xiafu-msft Sep 9, 2019
9c327cc
Merge branch 'feature/storage-preview3' into identity-sas
xiafu-msft Sep 9, 2019
450a66e
Merge branch 'feature/storage-preview3' into identity-sas
xiafu-msft Sep 9, 2019
969816b
Fix Pylint
xiafu-msft Sep 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[File][RestParity]Tweak Documentation and Tests
  • Loading branch information
xiafu-msft committed Sep 9, 2019
commit 3d00c52ade10755d46ec63d299a8afa34d27b09d
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ async def create_file( # type: ignore
The timeout parameter is expressed in seconds.
:param file_attributes:
The file system attributes for files and directories.
If not set, indicates preservation of existing values.
Here is an example for when the var type is str: 'Temporary|Archive'
If not set, the default value would be "None" and the attributes will be set to "Archive".
Here is an example for when the var type is str: 'Temporary|Archive'.
file_attributes value is not case sensitive.
:type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes`
:param file_creation_time: Creation time for the file
Default value: Now.
Expand Down Expand Up @@ -280,8 +281,9 @@ async def upload_file(
Defaults to UTF-8.
:param file_attributes:
The file system attributes for files and directories.
If not set, indicates preservation of existing values.
Here is an example for when the var type is str: 'Temporary|Archive'
If not set, the default value would be "None" and the attributes will be set to "Archive".
Here is an example for when the var type is str: 'Temporary|Archive'.
file_attributes value is not case sensitive.
:type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes`
:param file_creation_time: Creation time for the file
Default value: Now.
Expand Down
10 changes: 6 additions & 4 deletions sdk/storage/azure-storage-file/azure/storage/file/file_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ def create_file( # type: ignore
The timeout parameter is expressed in seconds.
:param file_attributes:
The file system attributes for files and directories.
If not set, indicates preservation of existing values.
Here is an example for when the var type is str: 'Temporary|Archive'
If not set, the default value would be "None" and the attributes will be set to "Archive".
Here is an example for when the var type is str: 'Temporary|Archive'.
file_attributes value is not case sensitive.
:type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes`
:param file_creation_time: Creation time for the file
Default value: Now.
Expand Down Expand Up @@ -467,8 +468,9 @@ def upload_file(
Defaults to UTF-8.
:param file_attributes:
The file system attributes for files and directories.
If not set, indicates preservation of existing values.
Here is an example for when the var type is str: 'Temporary|Archive'
If not set, the default value would be "None" and the attributes will be set to "Archive".
Here is an example for when the var type is str: 'Temporary|Archive'.
file_attributes value is not case sensitive.
:type file_attributes: str or :class:`~azure.storage.file.models.NTFSAttributes`
:param file_creation_time: Creation time for the file
Default value: Now.
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azure-storage-file/tests/test_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def test_create_file(self):
credential=self.settings.STORAGE_ACCOUNT_KEY)

# Act
resp = file_client.create_file(1024)
resp = file_client.create_file(1024, file_attributes="hidden")

# Assert
props = file_client.get_file_properties()
Expand Down
6 changes: 5 additions & 1 deletion sdk/storage/azure-storage-file/tests/test_file_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,16 @@ def test_create_file_with_metadata_async(self):
loop = asyncio.get_event_loop()
loop.run_until_complete(self._test_create_file_with_metadata_async())

async def test_create_file_when_file_permission_is_too_long(self):
async def _test_create_file_when_file_permission_is_too_long(self):
file_client = await self._get_file_client()
permission = str(self.get_random_bytes(8 * 1024 + 1))
with self.assertRaises(ValueError):
await file_client.create_file(1024, file_permission=permission)

def test_create_file_when_file_permission_is_too_long_async(self):
loop = asyncio.get_event_loop()
loop.run_until_complete(self._test_create_file_when_file_permission_is_too_long())

async def _test_create_file_with_invalid_file_permission(self):
# Arrange
file_name = await self._get_file_client()
Expand Down