Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 5 additions & 9 deletions sdk/tables/azure-data-tables/azure/data/tables/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def _from_generated(cls, generated, **kwargs): # pylint: disable=unused-argumen
days=generated.days,
)
def __repr__(self):
# type; () -> str
# type: () -> str
return "TableRetentionPolicy(enabled={}, days={})".format(self.enabled, self.days)[1024:]


Expand Down Expand Up @@ -582,9 +582,8 @@ def __init__(self, **kwargs):
self.object = kwargs.get('object', False)
self._str = ("s" if self.service else "") + ("o" if self.object else "")

def __repr__(self):
# type: () -> str
return "ResourceTypes(service={}, object={})".format(self.service, self.object)[1024:]
def __str__(self):
return self._str

@classmethod
def from_string(cls, string):
Expand Down Expand Up @@ -654,11 +653,8 @@ def __init__(self, **kwargs):
+ ("p" if self.process else "")
)

def __repr__(self):
# type: () -> str
return "AccountSasPermissions(read={}, write={}, delete={}, list={}, add={}, create={}, update={}, process={})".format( # pylint: disable=line-too-long
self.read, self.write, self.delete, self.list, self.add, self.create, self.update, self.process
)[1024:]
def __str__(self):
return self._str

@classmethod
def from_string(cls, permission, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Tue, 18 May 2021 17:37:12 GMT
- Wed, 07 Jul 2021 14:56:27 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Tue, 18 May 2021 17:37:12 GMT
- Wed, 07 Jul 2021 14:56:27 GMT
x-ms-version:
- '2019-02-02'
method: POST
Expand All @@ -33,7 +33,7 @@ interactions:
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
location:
- https://fake_table_account.table.core.windows.net/Tables('pytablesync99dc0b08')
server:
Expand Down Expand Up @@ -65,11 +65,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
x-ms-version:
- '2019-02-02'
method: PATCH
Expand All @@ -83,9 +83,9 @@ interactions:
content-length:
- '0'
date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
etag:
- W/"datetime'2021-05-18T17%3A37%3A13.5667224Z'"
- W/"datetime'2021-07-07T14%3A56%3A28.9609722Z'"
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
Expand Down Expand Up @@ -113,11 +113,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
x-ms-version:
- '2019-02-02'
method: PATCH
Expand All @@ -131,9 +131,9 @@ interactions:
content-length:
- '0'
date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
etag:
- W/"datetime'2021-05-18T17%3A37%3A13.6938138Z'"
- W/"datetime'2021-07-07T14%3A56%3A29.1551063Z'"
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
Expand All @@ -155,25 +155,25 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:28 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytablesync99dc0b08()?st=start&se=end&sp=r&sv=2019-02-02&ss=t&srt=o&sig=fake_token_value
response:
body:
string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#pytablesync99dc0b08","value":[{"odata.etag":"W/\"datetime''2021-05-18T17%3A37%3A13.5667224Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2021-05-18T17:37:13.5667224Z","text":"hello"},{"odata.etag":"W/\"datetime''2021-05-18T17%3A37%3A13.6938138Z''\"","PartitionKey":"test","RowKey":"test2","Timestamp":"2021-05-18T17:37:13.6938138Z","text":"hello"}]}'
string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#pytablesync99dc0b08","value":[{"odata.etag":"W/\"datetime''2021-07-07T14%3A56%3A28.9609722Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2021-07-07T14:56:28.9609722Z","text":"hello"},{"odata.etag":"W/\"datetime''2021-07-07T14%3A56%3A29.1551063Z''\"","PartitionKey":"test","RowKey":"test2","Timestamp":"2021-07-07T14:56:29.1551063Z","text":"hello"}]}'
headers:
cache-control:
- no-cache
content-type:
- application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date:
- Tue, 18 May 2021 17:37:13 GMT
- Wed, 07 Jul 2021 14:56:29 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding:
Expand All @@ -197,11 +197,11 @@ interactions:
Content-Length:
- '0'
Date:
- Tue, 18 May 2021 17:37:14 GMT
- Wed, 07 Jul 2021 14:56:29 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Tue, 18 May 2021 17:37:14 GMT
- Wed, 07 Jul 2021 14:56:29 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
Expand All @@ -215,7 +215,7 @@ interactions:
content-length:
- '0'
date:
- Tue, 18 May 2021 17:37:14 GMT
- Wed, 07 Jul 2021 14:56:29 GMT
server:
- Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Wed, 26 May 2021 21:30:45 GMT
- Wed, 07 Jul 2021 14:56:29 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Wed, 26 May 2021 21:30:45 GMT
- Wed, 07 Jul 2021 14:56:29 GMT
x-ms-version:
- '2019-02-02'
method: POST
Expand All @@ -26,7 +26,7 @@ interactions:
headers:
cache-control: no-cache
content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date: Wed, 26 May 2021 21:30:46 GMT
date: Wed, 07 Jul 2021 14:56:29 GMT
location: https://fake_table_account.table.core.windows.net/Tables('pytableasynce5ae0d85')
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
Expand All @@ -50,11 +50,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
x-ms-version:
- '2019-02-02'
method: PATCH
Expand All @@ -65,8 +65,8 @@ interactions:
headers:
cache-control: no-cache
content-length: '0'
date: Wed, 26 May 2021 21:30:47 GMT
etag: W/"datetime'2021-05-26T21%3A30%3A47.2093495Z'"
date: Wed, 07 Jul 2021 14:56:29 GMT
etag: W/"datetime'2021-07-07T14%3A56%3A30.5300535Z'"
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
Expand All @@ -88,11 +88,11 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
x-ms-version:
- '2019-02-02'
method: PATCH
Expand All @@ -103,8 +103,8 @@ interactions:
headers:
cache-control: no-cache
content-length: '0'
date: Wed, 26 May 2021 21:30:47 GMT
etag: W/"datetime'2021-05-26T21%3A30%3A47.3384413Z'"
date: Wed, 07 Jul 2021 14:56:29 GMT
etag: W/"datetime'2021-07-07T14%3A56%3A30.6411303Z'"
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
Expand All @@ -120,42 +120,41 @@ interactions:
DataServiceVersion:
- '3.0'
Date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
x-ms-version:
- '2019-02-02'
method: GET
uri: https://fake_table_account.table.core.windows.net/pytableasynce5ae0d85()?st=start&se=end&sp=r&sv=2019-02-02&ss=t&srt=o&sig=fake_token_value
response:
body:
string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#pytableasynce5ae0d85","value":[{"odata.etag":"W/\"datetime''2021-05-26T21%3A30%3A47.2093495Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2021-05-26T21:30:47.2093495Z","text":"hello"},{"odata.etag":"W/\"datetime''2021-05-26T21%3A30%3A47.3384413Z''\"","PartitionKey":"test","RowKey":"test2","Timestamp":"2021-05-26T21:30:47.3384413Z","text":"hello"}]}'
string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#pytableasynce5ae0d85","value":[{"odata.etag":"W/\"datetime''2021-07-07T14%3A56%3A30.5300535Z''\"","PartitionKey":"test","RowKey":"test1","Timestamp":"2021-07-07T14:56:30.5300535Z","text":"hello"},{"odata.etag":"W/\"datetime''2021-07-07T14%3A56%3A30.6411303Z''\"","PartitionKey":"test","RowKey":"test2","Timestamp":"2021-07-07T14:56:30.6411303Z","text":"hello"}]}'
headers:
cache-control: no-cache
content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8
date: Wed, 26 May 2021 21:30:47 GMT
date: Wed, 07 Jul 2021 14:56:30 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
transfer-encoding: chunked
vary: Origin
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
status:
code: 200
message: OK
url: https://seankaneprim.table.core.windows.net/pytableasynce5ae0d85()?st=2021-05-26T21:29:46Z&se=2021-05-26T22:30:46Z&sp=r&sv=2019-02-02&ss=t&srt=o&sig=%2B6bFrDjBUio4iokPWGI9PfUG9q1YmUGt9W1Fi3o4kqQ%3D
url: https://seankaneprim.table.core.windows.net/pytableasynce5ae0d85()?st=2021-07-07T14:55:30Z&se=2021-07-07T15:56:30Z&sp=r&sv=2019-02-02&ss=t&srt=o&sig=Q6mexoUdP/T0uQC2m/yJOOHlFFondZsCQ59W3t7LkAY%3D
- request:
body: null
headers:
Accept:
- application/json
Date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
User-Agent:
- azsdk-python-data-tables/12.0.0b7 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
- azsdk-python-data-tables/12.1.0 Python/3.9.0rc1 (Windows-10-10.0.19041-SP0)
x-ms-date:
- Wed, 26 May 2021 21:30:46 GMT
- Wed, 07 Jul 2021 14:56:30 GMT
x-ms-version:
- '2019-02-02'
method: DELETE
Expand All @@ -166,7 +165,7 @@ interactions:
headers:
cache-control: no-cache
content-length: '0'
date: Wed, 26 May 2021 21:30:47 GMT
date: Wed, 07 Jul 2021 14:56:30 GMT
server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0
x-content-type-options: nosniff
x-ms-version: '2019-02-02'
Expand Down
1 change: 0 additions & 1 deletion sdk/tables/azure-data-tables/tests/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,6 @@ def test_set_table_acl_too_many_ids(self, tables_storage_account_name, tables_pr
finally:
ts.delete_table(table.table_name)

@pytest.mark.live_test_only
@tables_decorator
def test_account_sas(self, tables_storage_account_name, tables_primary_storage_account_key):
account_url = self.account_url(tables_storage_account_name, "table")
Expand Down
1 change: 0 additions & 1 deletion sdk/tables/azure-data-tables/tests/test_table_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ async def test_set_table_acl_too_many_ids(self, tables_storage_account_name, tab
finally:
await ts.delete_table(table.table_name)

@pytest.mark.live_test_only
@tables_decorator_async
async def test_account_sas(self, tables_storage_account_name, tables_primary_storage_account_key):
account_url = self.account_url(tables_storage_account_name, "table")
Expand Down