Skip to content

Commit

Permalink
Update testing (#13821)
Browse files Browse the repository at this point in the history
* changes for test_table.py

* fixed up testing, noting which tests do not pass and the reasoning

* small additions to testing

* updated unicode test for storage

* final update

* updates that fix user_agent tests

* test CI returns a longer user agent so flipping the order for this test should solve the issue

* addresses anna's comments

* re-recorded a test with a recording error

* removed list comprehension for python3.5 compatability

* fixing a testing bug
  • Loading branch information
seankane-msft authored Sep 23, 2020
1 parent 092af33 commit 8cac468
Show file tree
Hide file tree
Showing 191 changed files with 4,777 additions and 4,453 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ._entity import TableEntity
from ._generated import AzureTable
from ._generated.models import (
AccessPolicy,
# AccessPolicy,
SignedIdentifier,
TableProperties,
QueryOptions
Expand All @@ -32,7 +32,7 @@
from ._serialize import serialize_iso
from ._deserialize import _return_headers_and_deserialized
from ._error import _process_table_error
from ._models import TableEntityPropertiesPaged, UpdateMode
from ._models import TableEntityPropertiesPaged, UpdateMode, AccessPolicy


class TableClient(TableClientBase):
Expand Down Expand Up @@ -155,7 +155,7 @@ def get_table_access_policy(
**kwargs)
except HttpResponseError as error:
_process_table_error(error)
return {s.id: s.access_policy or AccessPolicy() for s in identifiers} # pylint: disable=E1125
return {s.id: s.access_policy or AccessPolicy() for s in identifiers}

@distributed_trace
def set_table_access_policy(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(
self,
account_url, # type: str
table_name, # type: str
credential, # type : Optional[Any]=None
credential=None, # type : Optional[Any]=None
**kwargs # type: Any
):
# type: (...) -> None
Expand Down Expand Up @@ -163,7 +163,7 @@ async def get_table_access_policy(
**kwargs)
except HttpResponseError as error:
_process_table_error(error)
return {s.id: s.access_policy or AccessPolicy() for s in identifiers}
return {s.id: s.access_policy or AccessPolicy(start=None, expiry=None, permission=None) for s in identifiers}

@distributed_trace_async
async def set_table_access_policy(
Expand Down
Loading

0 comments on commit 8cac468

Please sign in to comment.