From 4d80aa242d567d41478212c589df966e16057916 Mon Sep 17 00:00:00 2001 From: seankane-msft Date: Fri, 30 Apr 2021 13:44:41 -0400 Subject: [PATCH 1/2] removed extras from tableItem, added awaits to two tests that were missing them --- sdk/tables/azure-data-tables/azure/data/tables/_models.py | 8 +------- sdk/tables/azure-data-tables/tests/test_table_async.py | 1 - .../azure-data-tables/tests/test_table_entity_async.py | 2 +- .../tests/test_table_entity_cosmos_async.py | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_models.py b/sdk/tables/azure-data-tables/azure/data/tables/_models.py index 758e3789e13f..4e88e50a2033 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_models.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_models.py @@ -492,20 +492,14 @@ class TableItem(object): Returned by TableServiceClient.list_tables and TableServiceClient.query_tables. :ivar str name: The name of the table. - :ivar str api_version: The API version included in the service call - :ivar str date: The date the service call was made """ - def __init__(self, name, **kwargs): + def __init__(self, name, **kwargs): # pylint: disable=unused-argument # type: (str, Dict[str, Any]) -> None """ :param str name: Name of the Table - :keyword str api_version: The API version included in the service call - :keyword str date: The date the service call was made """ self.name = name - self.api_version = kwargs.get("version") - self.date = kwargs.get("date") or kwargs.get("Date") @classmethod def _from_generated(cls, generated, **kwargs): 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 8003b1b57c74..9b3f38225f29 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_async.py @@ -154,7 +154,6 @@ async def test_query_tables_with_filter(self, tables_storage_account_name, table assert len(tables) == 1 for table_item in tables: assert isinstance(table_item, TableItem) - assert table_item.date is not None assert table_item.name is not None await ts.delete_table(table.table_name) diff --git a/sdk/tables/azure-data-tables/tests/test_table_entity_async.py b/sdk/tables/azure-data-tables/tests/test_table_entity_async.py index a95ffe8d3d40..b04bb410b093 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_entity_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_entity_async.py @@ -1512,7 +1512,7 @@ async def test_query_user_filter_binary(self, tables_storage_account_name, table assert length == 1 finally: - self._tear_down() + await self._tear_down() @TablesPreparer() async def test_query_user_filter_int64(self, tables_storage_account_name, tables_primary_storage_account_key): diff --git a/sdk/tables/azure-data-tables/tests/test_table_entity_cosmos_async.py b/sdk/tables/azure-data-tables/tests/test_table_entity_cosmos_async.py index d07f496d5e6e..c3fe5138d282 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_entity_cosmos_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_entity_cosmos_async.py @@ -1374,7 +1374,7 @@ async def test_query_user_filter_binary(self, tables_cosmos_account_name, tables assert length == 1 finally: - self._tear_down() + await self._tear_down() @CosmosPreparer() async def test_query_user_filter_int64(self, tables_cosmos_account_name, tables_primary_cosmos_account_key): From 3805e2568a0b1d185456cd71bdd0feac0646dac9 Mon Sep 17 00:00:00 2001 From: seankane-msft Date: Fri, 30 Apr 2021 13:45:27 -0400 Subject: [PATCH 2/2] changelog --- sdk/tables/azure-data-tables/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/tables/azure-data-tables/CHANGELOG.md b/sdk/tables/azure-data-tables/CHANGELOG.md index ab83820aad4a..befde3b4730b 100644 --- a/sdk/tables/azure-data-tables/CHANGELOG.md +++ b/sdk/tables/azure-data-tables/CHANGELOG.md @@ -10,6 +10,7 @@ * `TableClient.send_batch` has been renamed to `TableClient.submit_transaction`. * Removed `BatchTransactionResult` object in favor of returning an iterable of batched entities with returned metadata. * `BatchErrorException` has been renamed to `TableTransactionError`. +* Removed `date` and `api_version` from the `TableItem` class. **Fixes** * Fixed issue with Cosmos merge operations.