diff --git a/sdk/tables/azure-data-tables/CHANGELOG.md b/sdk/tables/azure-data-tables/CHANGELOG.md
index 3638e63d0d9f..39bb505d0e87 100644
--- a/sdk/tables/azure-data-tables/CHANGELOG.md
+++ b/sdk/tables/azure-data-tables/CHANGELOG.md
@@ -9,6 +9,8 @@
`TableAccessPolicy`, `TableMetrics`, `TableRetentionPolicy`, `TableCorsRule`
* All parameters for `TableServiceClient.set_service_properties` are now keyword-only.
* The `credential` parameter for all Clients is now keyword-only.
+* The method `TableClient.get_access_policy` will now return `None` where previously it returned an "empty" access policy object.
+* Timestamp properties on `TableAccessPolicy` instances returned from `TableClient.get_access_policy` will now be deserialized to `datetime` instances.
**Fixes**
* Fixed support for Cosmos emulator endpoint, via URL/credential or connection string.
diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py b/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py
index 103443e23f8e..e81c5ada9a85 100644
--- a/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py
+++ b/sdk/tables/azure-data-tables/azure/data/tables/_deserialize.py
@@ -91,6 +91,11 @@ def clean_up_dotnet_timestamps(value):
return value[0]
+def deserialize_iso(value):
+ if not value:
+ return value
+ return _from_entity_datetime(value)
+
def _from_entity_guid(value):
return UUID(value)
diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py
index 8cecd4846783..d8d4c8b1adb1 100644
--- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py
+++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py
@@ -5,7 +5,7 @@
# --------------------------------------------------------------------------
import functools
-from typing import Optional, Any, TYPE_CHECKING, Union, List, Tuple, Dict, Mapping, Iterable, overload
+from typing import Optional, Any, TYPE_CHECKING, Union, List, Tuple, Dict, Mapping, Iterable, overload, cast
try:
from urllib.parse import urlparse, unquote
except ImportError:
@@ -33,7 +33,7 @@
from ._serialize import _get_match_headers, _add_entity_properties
from ._base_client import parse_connection_str, TablesBaseClient
from ._serialize import serialize_iso, _parameter_filter_substitution
-from ._deserialize import _return_headers_and_deserialized
+from ._deserialize import deserialize_iso, _return_headers_and_deserialized
from ._table_batch import TableBatchOperations
from ._models import (
TableEntityPropertiesPaged,
@@ -169,12 +169,12 @@ def from_table_url(cls, table_url, **kwargs):
def get_table_access_policy(
self, **kwargs # type: Any
):
- # type: (...) -> Dict[str, TableAccessPolicy]
+ # type: (...) -> Dict[str, Optional[TableAccessPolicy]]
"""Retrieves details about any stored access policies specified on the table that may be
used with Shared Access Signatures.
:return: Dictionary of SignedIdentifiers
- :rtype: Dict[str, :class:`~azure.data.tables.TableAccessPolicy`]
+ :rtype: Dict[str, Optional[:class:`~azure.data.tables.TableAccessPolicy`]]
:raises: :class:`~azure.core.exceptions.HttpResponseError`
"""
timeout = kwargs.pop("timeout", None)
@@ -187,29 +187,43 @@ def get_table_access_policy(
)
except HttpResponseError as error:
_process_table_error(error)
- return {s.id: s.access_policy or TableAccessPolicy() for s in identifiers} # type: ignore
+ output = {} # type: Dict[str, Optional[TableAccessPolicy]]
+ for identifier in cast(List[SignedIdentifier], identifiers):
+ if identifier.access_policy:
+ output[identifier.id] = TableAccessPolicy(
+ start=deserialize_iso(identifier.access_policy.start),
+ expiry=deserialize_iso(identifier.access_policy.expiry),
+ permission=identifier.access_policy.permission
+ )
+ else:
+ output[identifier.id] = None
+ return output
@distributed_trace
def set_table_access_policy(
self,
- signed_identifiers, # type: Dict[str, TableAccessPolicy]
+ signed_identifiers, # type: Dict[str, Optional[TableAccessPolicy]]
**kwargs
):
# type: (...) -> None
"""Sets stored access policies for the table that may be used with Shared Access Signatures.
:param signed_identifiers: Access policies to set for the table
- :type signed_identifiers: Dict[str, :class:`~azure.data.tables.TableAccessPolicy`]
+ :type signed_identifiers: Dict[str, Optional[:class:`~azure.data.tables.TableAccessPolicy`]]
:return: None
:rtype: None
:raises: :class:`~azure.core.exceptions.HttpResponseError`
"""
identifiers = []
for key, value in signed_identifiers.items():
+ payload = None
if value:
- value.start = serialize_iso(value.start)
- value.expiry = serialize_iso(value.expiry)
- identifiers.append(SignedIdentifier(id=key, access_policy=value))
+ payload = TableAccessPolicy(
+ start=serialize_iso(value.start),
+ expiry=serialize_iso(value.expiry),
+ permission=value.permission
+ )
+ identifiers.append(SignedIdentifier(id=key, access_policy=payload))
signed_identifiers = identifiers # type: ignore
try:
self._client.table.set_access_policy(
diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py
index 84ffaea67f41..ed4f669e9717 100644
--- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py
+++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py
@@ -4,7 +4,7 @@
# license information.
# --------------------------------------------------------------------------
import functools
-from typing import List, Union, Any, Optional, Mapping, Iterable, Dict, overload
+from typing import List, Union, Any, Optional, Mapping, Iterable, Dict, overload, cast
try:
from urllib.parse import urlparse, unquote
except ImportError:
@@ -23,7 +23,7 @@
from .._generated.models import SignedIdentifier, TableProperties, QueryOptions
from .._models import TableAccessPolicy, TableItem
from .._serialize import serialize_iso, _parameter_filter_substitution
-from .._deserialize import _return_headers_and_deserialized
+from .._deserialize import deserialize_iso, _return_headers_and_deserialized
from .._error import (
_process_table_error,
_validate_table_name,
@@ -158,13 +158,13 @@ def from_table_url(
return cls(endpoint, table_name=table_name, **kwargs)
@distributed_trace_async
- async def get_table_access_policy(self, **kwargs) -> Mapping[str, TableAccessPolicy]:
+ async def get_table_access_policy(self, **kwargs) -> Mapping[str, Optional[TableAccessPolicy]]:
"""
Retrieves details about any stored access policies specified on the table that may be
used with Shared Access Signatures.
:return: Dictionary of SignedIdentifiers
- :rtype: Dict[str, :class:`~azure.data.tables.TableAccessPolicy`]
+ :rtype: Dict[str, Optional[:class:`~azure.data.tables.TableAccessPolicy`]]
:raises: :class:`~azure.core.exceptions.HttpResponseError`
"""
timeout = kwargs.pop("timeout", None)
@@ -177,16 +177,22 @@ async def get_table_access_policy(self, **kwargs) -> Mapping[str, TableAccessPol
)
except HttpResponseError as error:
_process_table_error(error)
- return {
- s.id: s.access_policy
- or TableAccessPolicy(start=None, expiry=None, permission=None)
- for s in identifiers # type: ignore
- }
+ output = {} # type: Dict[str, Optional[TableAccessPolicy]]
+ for identifier in cast(List[SignedIdentifier], identifiers):
+ if identifier.access_policy:
+ output[identifier.id] = TableAccessPolicy(
+ start=deserialize_iso(identifier.access_policy.start),
+ expiry=deserialize_iso(identifier.access_policy.expiry),
+ permission=identifier.access_policy.permission
+ )
+ else:
+ output[identifier.id] = None
+ return output
@distributed_trace_async
async def set_table_access_policy(
self,
- signed_identifiers: Mapping[str, TableAccessPolicy],
+ signed_identifiers: Mapping[str, Optional[TableAccessPolicy]],
**kwargs
) -> None:
"""Sets stored access policies for the table that may be used with Shared Access Signatures.
@@ -199,10 +205,14 @@ async def set_table_access_policy(
"""
identifiers = []
for key, value in signed_identifiers.items():
+ payload = None
if value:
- value.start = serialize_iso(value.start)
- value.expiry = serialize_iso(value.expiry)
- identifiers.append(SignedIdentifier(id=key, access_policy=value))
+ payload = TableAccessPolicy(
+ start=serialize_iso(value.start),
+ expiry=serialize_iso(value.expiry),
+ permission=value.permission
+ )
+ identifiers.append(SignedIdentifier(id=key, access_policy=payload))
try:
await self._client.table.set_access_policy(
table=self.table_name, table_acl=identifiers or None, **kwargs # type: ignore
diff --git a/sdk/tables/azure-data-tables/tests/_shared/testcase.py b/sdk/tables/azure-data-tables/tests/_shared/testcase.py
index ffebec0366ca..e8315f52cb1e 100644
--- a/sdk/tables/azure-data-tables/tests/_shared/testcase.py
+++ b/sdk/tables/azure-data-tables/tests/_shared/testcase.py
@@ -296,6 +296,15 @@ def _assert_properties_default(self, prop):
self._assert_metrics_equal(prop["minute_metrics"], TableMetrics())
self._assert_cors_equal(prop["cors"], list())
+ def _assert_policy_datetime(self, val1, val2):
+ assert isinstance(val2, datetime)
+ assert val1.year == val2.year
+ assert val1.month == val2.month
+ assert val1.day == val2.day
+ assert val1.hour == val2.hour
+ assert val1.minute == val2.minute
+ assert val1.second == val2.second
+
def _assert_logging_equal(self, log1, log2):
if log1 is None or log2 is None:
assert log1 == log2
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml
index ac2c18bc5bc4..b7d1e5e20d8e 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_too_many_ids.yaml
@@ -15,11 +15,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Wed, 14 Apr 2021 18:10:59 GMT
+ - Tue, 08 Jun 2021 02:27:57 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b7 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Wed, 14 Apr 2021 18:10:59 GMT
+ - Tue, 08 Jun 2021 02:27:57 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -33,7 +33,7 @@ interactions:
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- - Wed, 14 Apr 2021 18:10:59 GMT
+ - Tue, 08 Jun 2021 02:27:57 GMT
location:
- https://fake_table_account.table.core.windows.net/Tables('pytablesync6f17111b')
server:
@@ -63,11 +63,11 @@ interactions:
Content-Type:
- application/xml
Date:
- - Wed, 14 Apr 2021 18:11:00 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b7 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Wed, 14 Apr 2021 18:11:00 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -77,16 +77,16 @@ interactions:
string: 'InvalidXmlDocumentXML specified is not syntactically valid.
- RequestId:e4afd8b3-1002-0010-1959-311f4c000000
+ RequestId:e4d09754-d002-00a6-300d-5c6d3a000000
- Time:2021-04-14T18:11:00.9932670Z'
+ Time:2021-06-08T02:27:58.1749862Z'
headers:
content-length:
- '327'
content-type:
- application/xml
date:
- - Wed, 14 Apr 2021 18:11:00 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-error-code:
@@ -108,11 +108,11 @@ interactions:
Content-Length:
- '0'
Date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b7 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -126,7 +126,7 @@ interactions:
content-length:
- '0'
date:
- - Wed, 14 Apr 2021 18:11:00 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifier.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifier.yaml
index 792c153c0ec3..dead1550bcb9 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifier.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifier.yaml
@@ -15,11 +15,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Fri, 18 Dec 2020 17:29:43 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:43 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -33,7 +33,7 @@ interactions:
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- - Fri, 18 Dec 2020 17:29:43 GMT
+ - Tue, 08 Jun 2021 02:27:57 GMT
location:
- https://fake_table_account.table.core.windows.net/Tables('pytablesyncb9bd17bb')
server:
@@ -50,7 +50,8 @@ interactions:
- request:
body: '
- empty'
+ nullemptypartialrfull2021-06-08T02:10:09Z2021-06-08T02:10:09Zr'
headers:
Accept:
- application/xml
@@ -59,15 +60,15 @@ interactions:
Connection:
- keep-alive
Content-Length:
- - '129'
+ - '480'
Content-Type:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -79,7 +80,7 @@ interactions:
content-length:
- '0'
date:
- - Fri, 18 Dec 2020 17:29:43 GMT
+ - Tue, 08 Jun 2021 02:27:57 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-version:
@@ -97,23 +98,99 @@ interactions:
Connection:
- keep-alive
Date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytablesyncb9bd17bb?comp=acl
response:
body:
- string: "\uFEFFempty"
+ string: "\uFEFFnullemptypartialrfull2021-06-08T02:10:09.0000000Z2021-06-08T02:10:09.0000000Zr"
headers:
content-type:
- application/xml
date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:57 GMT
+ server:
+ - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding:
+ - chunked
+ x-ms-version:
+ - '2019-02-02'
+ status:
+ code: 200
+ message: OK
+- request:
+ body: '
+
+ nullpartialfull2021-06-08T02:10:09Z2021-06-08T02:10:09Zr'
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Content-Length:
+ - '358'
+ Content-Type:
+ - application/xml
+ Date:
+ - Tue, 08 Jun 2021 02:27:58 GMT
+ User-Agent:
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Tue, 08 Jun 2021 02:27:58 GMT
+ x-ms-version:
+ - '2019-02-02'
+ method: PUT
+ uri: https://fake_table_account.table.core.windows.net/pytablesyncb9bd17bb?comp=acl
+ response:
+ body:
+ string: ''
+ headers:
+ content-length:
+ - '0'
+ date:
+ - Tue, 08 Jun 2021 02:27:57 GMT
+ server:
+ - Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version:
+ - '2019-02-02'
+ status:
+ code: 204
+ message: No Content
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Accept-Encoding:
+ - gzip, deflate
+ Connection:
+ - keep-alive
+ Date:
+ - Tue, 08 Jun 2021 02:27:58 GMT
+ User-Agent:
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Tue, 08 Jun 2021 02:27:58 GMT
+ x-ms-version:
+ - '2019-02-02'
+ method: GET
+ uri: https://fake_table_account.table.core.windows.net/pytablesyncb9bd17bb?comp=acl
+ response:
+ body:
+ string: "\uFEFFnullpartialfull2021-06-08T02:10:09.0000000Z2021-06-08T02:10:09.0000000Zr"
+ headers:
+ content-type:
+ - application/xml
+ date:
+ - Tue, 08 Jun 2021 02:27:57 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
@@ -135,11 +212,11 @@ interactions:
Content-Length:
- '0'
Date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -153,7 +230,7 @@ interactions:
content-length:
- '0'
date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:57 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml
index 035b1baebd0d..41b20a0b390b 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_empty_signed_identifiers.yaml
@@ -15,11 +15,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -33,7 +33,7 @@ interactions:
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- - Fri, 18 Dec 2020 17:29:44 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
location:
- https://fake_table_account.table.core.windows.net/Tables('pytablesyncd1eb182e')
server:
@@ -61,11 +61,11 @@ interactions:
Content-Type:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -77,7 +77,7 @@ interactions:
content-length:
- '0'
date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-version:
@@ -95,24 +95,24 @@ interactions:
Connection:
- keep-alive
Date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytablesyncd1eb182e?comp=acl
response:
body:
- string: "\uFEFF"
+ string: "\uFEFF"
headers:
content-type:
- application/xml
date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
@@ -134,11 +134,11 @@ interactions:
Content-Length:
- '0'
Date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -152,7 +152,7 @@ interactions:
content-length:
- '0'
date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml
index 78ae67559379..3a8c65bbe053 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table.test_set_table_acl_with_signed_identifiers.yaml
@@ -15,11 +15,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:45 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -33,7 +33,7 @@ interactions:
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
location:
- https://fake_table_account.table.core.windows.net/Tables('pytablesync45dd15a0')
server:
@@ -50,7 +50,7 @@ interactions:
- request:
body: '
- testid2020-12-18T17:24:46Z2020-12-18T18:29:46Zr'
+ testid2021-06-08T02:05:09Z2021-06-08T03:10:09Zr'
headers:
Accept:
- application/xml
@@ -63,11 +63,11 @@ interactions:
Content-Type:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -79,7 +79,7 @@ interactions:
content-length:
- '0'
date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-version:
@@ -97,23 +97,23 @@ interactions:
Connection:
- keep-alive
Date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytablesync45dd15a0?comp=acl
response:
body:
- string: "\uFEFFtestid2020-12-18T17:24:46.0000000Z2020-12-18T18:29:46.0000000Zr"
+ string: "\uFEFFtestid2021-06-08T02:05:09.0000000Z2021-06-08T03:10:09.0000000Zr"
headers:
content-type:
- application/xml
date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
@@ -135,11 +135,11 @@ interactions:
Content-Length:
- '0'
Date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -153,7 +153,7 @@ interactions:
content-length:
- '0'
date:
- - Fri, 18 Dec 2020 17:29:46 GMT
+ - Tue, 08 Jun 2021 02:27:58 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml
index a9c6722a7034..03fc2d299491 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_too_many_ids.yaml
@@ -11,11 +11,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b7 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -26,7 +26,7 @@ interactions:
headers:
cache-control: no-cache
content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
- date: Wed, 14 Apr 2021 18:11:01 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
location: https://fake_table_account.table.core.windows.net/Tables('pytableasynce03c1398')
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
@@ -48,11 +48,11 @@ interactions:
Content-Type:
- application/xml
Date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b7 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -62,13 +62,13 @@ interactions:
string: 'InvalidXmlDocumentXML specified is not syntactically valid.
- RequestId:a8b32b21-b002-008f-3959-31534e000000
+ RequestId:c71a2395-8002-0084-1b0d-5ca825000000
- Time:2021-04-14T18:11:01.5586123Z'
+ Time:2021-06-08T02:27:59.4368658Z'
headers:
content-length: '327'
content-type: application/xml
- date: Wed, 14 Apr 2021 18:11:01 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-error-code: InvalidXmlDocument
x-ms-version: '2019-02-02'
@@ -82,11 +82,11 @@ interactions:
Accept:
- application/json
Date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b7 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Wed, 14 Apr 2021 18:11:01 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -97,7 +97,7 @@ interactions:
headers:
cache-control: no-cache
content-length: '0'
- date: Wed, 14 Apr 2021 18:11:01 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifier.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifier.yaml
index cb3c8b625696..7307b6ad016d 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifier.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifier.yaml
@@ -11,11 +11,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Fri, 18 Dec 2020 17:29:58 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:58 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -26,7 +26,7 @@ interactions:
headers:
cache-control: no-cache
content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
- date: Fri, 18 Dec 2020 17:29:58 GMT
+ date: Tue, 08 Jun 2021 02:27:58 GMT
location: https://fake_table_account.table.core.windows.net/Tables('pytableasync52c11a38')
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
@@ -39,20 +39,21 @@ interactions:
- request:
body: '
- empty'
+ nullemptypartialrfull2021-06-08T02:10:09Z2021-06-08T02:10:09Zr'
headers:
Accept:
- application/xml
Content-Length:
- - '129'
+ - '480'
Content-Type:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:29:58 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:58 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -62,7 +63,7 @@ interactions:
string: ''
headers:
content-length: '0'
- date: Fri, 18 Dec 2020 17:29:58 GMT
+ date: Tue, 08 Jun 2021 02:27:58 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-version: '2019-02-02'
status:
@@ -75,21 +76,82 @@ interactions:
Accept:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:29:58 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:58 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytableasync52c11a38?comp=acl
response:
body:
- string: "\uFEFFempty"
+ string: "\uFEFFnullemptypartialrfull2021-06-08T02:10:09.0000000Z2021-06-08T02:10:09.0000000Zr"
headers:
content-type: application/xml
- date: Fri, 18 Dec 2020 17:29:58 GMT
+ date: Tue, 08 Jun 2021 02:27:58 GMT
+ server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
+ transfer-encoding: chunked
+ x-ms-version: '2019-02-02'
+ status:
+ code: 200
+ message: OK
+ url: https://seankaneprim.table.core.windows.net/pytableasync52c11a38?comp=acl
+- request:
+ body: '
+
+ nullpartialfull2021-06-08T02:10:09Z2021-06-08T02:10:09Zr'
+ headers:
+ Accept:
+ - application/xml
+ Content-Length:
+ - '358'
+ Content-Type:
+ - application/xml
+ Date:
+ - Tue, 08 Jun 2021 02:27:59 GMT
+ User-Agent:
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Tue, 08 Jun 2021 02:27:59 GMT
+ x-ms-version:
+ - '2019-02-02'
+ method: PUT
+ uri: https://fake_table_account.table.core.windows.net/pytableasync52c11a38?comp=acl
+ response:
+ body:
+ string: ''
+ headers:
+ content-length: '0'
+ date: Tue, 08 Jun 2021 02:27:58 GMT
+ server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
+ x-ms-version: '2019-02-02'
+ status:
+ code: 204
+ message: No Content
+ url: https://seankaneprim.table.core.windows.net/pytableasync52c11a38?comp=acl
+- request:
+ body: null
+ headers:
+ Accept:
+ - application/xml
+ Date:
+ - Tue, 08 Jun 2021 02:27:59 GMT
+ User-Agent:
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
+ x-ms-date:
+ - Tue, 08 Jun 2021 02:27:59 GMT
+ x-ms-version:
+ - '2019-02-02'
+ method: GET
+ uri: https://fake_table_account.table.core.windows.net/pytableasync52c11a38?comp=acl
+ response:
+ body:
+ string: "\uFEFFnullpartialfull2021-06-08T02:10:09.0000000Z2021-06-08T02:10:09.0000000Zr"
+ headers:
+ content-type: application/xml
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
x-ms-version: '2019-02-02'
@@ -103,11 +165,11 @@ interactions:
Accept:
- application/json
Date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -118,7 +180,7 @@ interactions:
headers:
cache-control: no-cache
content-length: '0'
- date: Fri, 18 Dec 2020 17:29:58 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml
index 1a0ae6b2518e..c351f7fb5d96 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_empty_signed_identifiers.yaml
@@ -11,11 +11,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -26,7 +26,7 @@ interactions:
headers:
cache-control: no-cache
content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
- date: Fri, 18 Dec 2020 17:29:59 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
location: https://fake_table_account.table.core.windows.net/Tables('pytableasync6d6c1aab')
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
@@ -44,11 +44,11 @@ interactions:
Content-Type:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -58,7 +58,7 @@ interactions:
string: ''
headers:
content-length: '0'
- date: Fri, 18 Dec 2020 17:29:59 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-version: '2019-02-02'
status:
@@ -71,22 +71,22 @@ interactions:
Accept:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytableasync6d6c1aab?comp=acl
response:
body:
- string: "\uFEFF"
+ string: "\uFEFF"
headers:
content-type: application/xml
- date: Fri, 18 Dec 2020 17:29:59 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
x-ms-version: '2019-02-02'
@@ -100,11 +100,11 @@ interactions:
Accept:
- application/json
Date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:29:59 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -115,7 +115,7 @@ interactions:
headers:
cache-control: no-cache
content-length: '0'
- date: Fri, 18 Dec 2020 17:30:00 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml
index a9b2c693c8b2..f86bf70275de 100644
--- a/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml
+++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_async.test_set_table_acl_with_signed_identifiers.yaml
@@ -11,11 +11,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:27:59 GMT
x-ms-version:
- '2019-02-02'
method: POST
@@ -26,7 +26,7 @@ interactions:
headers:
cache-control: no-cache
content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
- date: Fri, 18 Dec 2020 17:30:00 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
location: https://fake_table_account.table.core.windows.net/Tables('pytableasyncd261181d')
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
@@ -39,7 +39,7 @@ interactions:
- request:
body: '
- testid2020-12-18T17:25:00Z2020-12-18T18:30:00Zr'
+ testid2021-06-08T02:05:09Z2021-06-08T03:10:09Zr'
headers:
Accept:
- application/xml
@@ -48,11 +48,11 @@ interactions:
Content-Type:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:28:00 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:28:00 GMT
x-ms-version:
- '2019-02-02'
method: PUT
@@ -62,7 +62,7 @@ interactions:
string: ''
headers:
content-length: '0'
- date: Fri, 18 Dec 2020 17:30:00 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-ms-version: '2019-02-02'
status:
@@ -75,21 +75,21 @@ interactions:
Accept:
- application/xml
Date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:28:00 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:28:00 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytableasyncd261181d?comp=acl
response:
body:
- string: "\uFEFFtestid2020-12-18T17:25:00.0000000Z2020-12-18T18:30:00.0000000Zr"
+ string: "\uFEFFtestid2021-06-08T02:05:09.0000000Z2021-06-08T03:10:09.0000000Zr"
headers:
content-type: application/xml
- date: Fri, 18 Dec 2020 17:30:00 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
x-ms-version: '2019-02-02'
@@ -103,11 +103,11 @@ interactions:
Accept:
- application/json
Date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:28:00 GMT
User-Agent:
- - azsdk-python-data-tables/12.0.0b4 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
+ - azsdk-python-data-tables/12.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0)
x-ms-date:
- - Fri, 18 Dec 2020 17:30:00 GMT
+ - Tue, 08 Jun 2021 02:28:00 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
@@ -118,7 +118,7 @@ interactions:
headers:
cache-control: no-cache
content-length: '0'
- date: Fri, 18 Dec 2020 17:30:01 GMT
+ date: Tue, 08 Jun 2021 02:27:59 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
diff --git a/sdk/tables/azure-data-tables/tests/test_table.py b/sdk/tables/azure-data-tables/tests/test_table.py
index d53aa3098b30..5bdca6ae32d6 100644
--- a/sdk/tables/azure-data-tables/tests/test_table.py
+++ b/sdk/tables/azure-data-tables/tests/test_table.py
@@ -311,16 +311,42 @@ def test_set_table_acl_with_empty_signed_identifier(self, tables_storage_account
table = self._create_table(ts)
try:
- # Act
- table.set_table_access_policy(signed_identifiers={'empty': None})
- # Assert
+ dt = datetime(2021, 6, 8, 2, 10, 9)
+ signed_identifiers={
+ 'null': None,
+ 'empty': TableAccessPolicy(start=None, expiry=None, permission=None),
+ 'partial': TableAccessPolicy(permission='r'),
+ 'full': TableAccessPolicy(start=dt, expiry=dt, permission='r')
+ }
+ table.set_table_access_policy(signed_identifiers)
acl = table.get_table_access_policy()
assert acl is not None
- assert len(acl) == 1
- assert acl['empty'] is not None
- assert acl['empty'].permission is None
- assert acl['empty'].expiry is None
- assert acl['empty'].start is None
+ assert len(acl) == 4
+ assert acl['null'] is None
+ assert acl['empty'] is None
+ assert acl['partial'] is not None
+ assert acl['partial'].permission == 'r'
+ assert acl['partial'].expiry is None
+ assert acl['partial'].start is None
+ assert acl['full'] is not None
+ assert acl['full'].permission == 'r'
+ self._assert_policy_datetime(dt, acl['full'].expiry)
+ self._assert_policy_datetime(dt, acl['full'].start)
+
+ signed_identifiers.pop('empty')
+ signed_identifiers['partial'] = None
+
+ table.set_table_access_policy(signed_identifiers)
+ acl = table.get_table_access_policy()
+ assert acl is not None
+ assert len(acl) == 3
+ assert 'empty' not in acl
+ assert acl['null'] is None
+ assert acl['partial'] is None
+ assert acl['full'] is not None
+ assert acl['full'].permission == 'r'
+ self._assert_policy_datetime(dt, acl['full'].expiry)
+ self._assert_policy_datetime(dt, acl['full'].start)
finally:
ts.delete_table(table.table_name)
@@ -335,17 +361,19 @@ def test_set_table_acl_with_signed_identifiers(self, tables_storage_account_name
client = ts.get_table_client(table_name=table.table_name)
# Act
- identifiers = dict()
- identifiers['testid'] = TableAccessPolicy(start=datetime.utcnow() - timedelta(minutes=5),
- expiry=datetime.utcnow() + timedelta(hours=1),
- permission='r')
+ start = datetime(2021, 6, 8, 2, 10, 9) - timedelta(minutes=5)
+ expiry = datetime(2021, 6, 8, 2, 10, 9) + timedelta(hours=1)
+ identifiers = {'testid': TableAccessPolicy(start=start, expiry=expiry, permission='r')}
try:
client.set_table_access_policy(signed_identifiers=identifiers)
# Assert
acl = client.get_table_access_policy()
assert acl is not None
assert len(acl) == 1
- assert 'testid' in acl
+ assert acl.get('testid')
+ self._assert_policy_datetime(start, acl['testid'].start)
+ self._assert_policy_datetime(expiry, acl['testid'].expiry)
+ assert acl['testid'].permission == 'r'
finally:
ts.delete_table(table.table_name)
diff --git a/sdk/tables/azure-data-tables/tests/test_table_async.py b/sdk/tables/azure-data-tables/tests/test_table_async.py
index e5b7ce4e344c..f8f53c4b600f 100644
--- a/sdk/tables/azure-data-tables/tests/test_table_async.py
+++ b/sdk/tables/azure-data-tables/tests/test_table_async.py
@@ -255,16 +255,42 @@ async def test_set_table_acl_with_empty_signed_identifier(self, tables_storage_a
ts = TableServiceClient(url, credential=tables_primary_storage_account_key)
table = await self._create_table(ts)
try:
- # Act
- await table.set_table_access_policy(signed_identifiers={'empty': None})
- # Assert
+ dt = datetime(2021, 6, 8, 2, 10, 9)
+ signed_identifiers={
+ 'null': None,
+ 'empty': TableAccessPolicy(start=None, expiry=None, permission=None),
+ 'partial': TableAccessPolicy(permission='r'),
+ 'full': TableAccessPolicy(start=dt, expiry=dt, permission='r')
+ }
+ await table.set_table_access_policy(signed_identifiers)
acl = await table.get_table_access_policy()
assert acl is not None
- assert len(acl) == 1
- assert acl['empty'] is not None
- assert acl['empty'].permission is None
- assert acl['empty'].expiry is None
- assert acl['empty'].start is None
+ assert len(acl) == 4
+ assert acl['null'] is None
+ assert acl['empty'] is None
+ assert acl['partial'] is not None
+ assert acl['partial'].permission == 'r'
+ assert acl['partial'].expiry is None
+ assert acl['partial'].start is None
+ assert acl['full'] is not None
+ assert acl['full'].permission == 'r'
+ self._assert_policy_datetime(dt, acl['full'].expiry)
+ self._assert_policy_datetime(dt, acl['full'].start)
+
+ signed_identifiers.pop('empty')
+ signed_identifiers['partial'] = None
+
+ await table.set_table_access_policy(signed_identifiers)
+ acl = await table.get_table_access_policy()
+ assert acl is not None
+ assert len(acl) == 3
+ assert 'empty' not in acl
+ assert acl['null'] is None
+ assert acl['partial'] is None
+ assert acl['full'] is not None
+ assert acl['full'].permission == 'r'
+ self._assert_policy_datetime(dt, acl['full'].expiry)
+ self._assert_policy_datetime(dt, acl['full'].start)
finally:
await ts.delete_table(table.table_name)
@@ -277,10 +303,9 @@ async def test_set_table_acl_with_signed_identifiers(self, tables_storage_accoun
client = ts.get_table_client(table_name=table.table_name)
# Act
- identifiers = dict()
- identifiers['testid'] = TableAccessPolicy(start=datetime.utcnow() - timedelta(minutes=5),
- expiry=datetime.utcnow() + timedelta(hours=1),
- permission=TableSasPermissions(read=True))
+ start = datetime(2021, 6, 8, 2, 10, 9) - timedelta(minutes=5)
+ expiry = datetime(2021, 6, 8, 2, 10, 9) + timedelta(hours=1)
+ identifiers = {'testid': TableAccessPolicy(start=start, expiry=expiry, permission=TableSasPermissions(read=True))}
try:
await client.set_table_access_policy(signed_identifiers=identifiers)
@@ -288,7 +313,10 @@ async def test_set_table_acl_with_signed_identifiers(self, tables_storage_accoun
acl = await client.get_table_access_policy()
assert acl is not None
assert len(acl) == 1
- assert 'testid' in acl
+ assert acl.get('testid')
+ self._assert_policy_datetime(start, acl['testid'].start)
+ self._assert_policy_datetime(expiry, acl['testid'].expiry)
+ assert acl['testid'].permission == 'r'
finally:
await ts.delete_table(table.table_name)