|
55 | 55 | ), |
56 | 56 | ], |
57 | 57 | ) |
58 | | -def test_bigtable_table_admin_async_client_client_version(transport_class, transport_name): |
| 58 | +def test_bigtable_table_admin_async_client_client_version( |
| 59 | + transport_class, transport_name |
| 60 | +): |
59 | 61 | with mock.patch.object(transport_class, "__init__") as patched: |
60 | 62 | patched.return_value = None |
61 | 63 | BigtableTableAdminAsyncClient(transport=transport_name) |
@@ -143,8 +145,12 @@ async def test_bigtable_table_admin_async_client_wait_for_consistency( |
143 | 145 | check_mock_side_effect = [FALSE_CONSISTENCY_RESPONSE] * (poll_count - 1) |
144 | 146 | check_mock_side_effect.append(TRUE_CONSISTENCY_RESPONSE) |
145 | 147 |
|
146 | | - with mock.patch.object(client, "generate_consistency_token", new_callable=mock.AsyncMock) as generate_mock: |
147 | | - with mock.patch.object(client, "check_consistency", new_callable=mock.AsyncMock) as check_mock: |
| 148 | + with mock.patch.object( |
| 149 | + client, "generate_consistency_token", new_callable=mock.AsyncMock |
| 150 | + ) as generate_mock: |
| 151 | + with mock.patch.object( |
| 152 | + client, "check_consistency", new_callable=mock.AsyncMock |
| 153 | + ) as check_mock: |
148 | 154 | generate_mock.return_value = ( |
149 | 155 | bigtable_table_admin.GenerateConsistencyTokenResponse( |
150 | 156 | consistency_token=CONSISTENCY_TOKEN, |
@@ -189,15 +195,21 @@ async def test_bigtable_table_admin_async_client_wait_for_consistency_error_in_c |
189 | 195 | ) |
190 | 196 |
|
191 | 197 | with pytest.raises(exceptions.GoogleAPICallError): |
192 | | - with mock.patch.object(client, "generate_consistency_token", new_callable=mock.AsyncMock) as generate_mock: |
| 198 | + with mock.patch.object( |
| 199 | + client, "generate_consistency_token", new_callable=mock.AsyncMock |
| 200 | + ) as generate_mock: |
193 | 201 | generate_mock.side_effect = exceptions.DeadlineExceeded( |
194 | 202 | "Deadline Exceeded." |
195 | 203 | ) |
196 | 204 | await client.wait_for_consistency(request) |
197 | 205 |
|
198 | 206 | with pytest.raises(exceptions.GoogleAPICallError): |
199 | | - with mock.patch.object(client, "generate_consistency_token", new_callable=mock.AsyncMock) as generate_mock: |
200 | | - with mock.patch.object(client, "check_consistency", new_callable=mock.AsyncMock) as check_mock: |
| 207 | + with mock.patch.object( |
| 208 | + client, "generate_consistency_token", new_callable=mock.AsyncMock |
| 209 | + ) as generate_mock: |
| 210 | + with mock.patch.object( |
| 211 | + client, "check_consistency", new_callable=mock.AsyncMock |
| 212 | + ) as check_mock: |
201 | 213 | generate_mock.return_value = ( |
202 | 214 | bigtable_table_admin.GenerateConsistencyTokenResponse( |
203 | 215 | consistency_token=CONSISTENCY_TOKEN, |
|
0 commit comments