@@ -1328,12 +1328,7 @@ async def test_create_assessment_async_use_cached_wrapped_rpc(
13281328 )
13291329
13301330 # Replace cached wrapped function with mock
1331- class AwaitableMock (mock .AsyncMock ):
1332- def __await__ (self ):
1333- self .await_count += 1
1334- return iter ([])
1335-
1336- mock_object = AwaitableMock ()
1331+ mock_object = mock .AsyncMock ()
13371332 client ._client ._transport ._wrapped_methods [
13381333 client ._client ._transport .create_assessment
13391334 ] = mock_object
@@ -1727,12 +1722,7 @@ async def test_annotate_assessment_async_use_cached_wrapped_rpc(
17271722 )
17281723
17291724 # Replace cached wrapped function with mock
1730- class AwaitableMock (mock .AsyncMock ):
1731- def __await__ (self ):
1732- self .await_count += 1
1733- return iter ([])
1734-
1735- mock_object = AwaitableMock ()
1725+ mock_object = mock .AsyncMock ()
17361726 client ._client ._transport ._wrapped_methods [
17371727 client ._client ._transport .annotate_assessment
17381728 ] = mock_object
@@ -2115,12 +2105,7 @@ async def test_create_key_async_use_cached_wrapped_rpc(transport: str = "grpc_as
21152105 )
21162106
21172107 # Replace cached wrapped function with mock
2118- class AwaitableMock (mock .AsyncMock ):
2119- def __await__ (self ):
2120- self .await_count += 1
2121- return iter ([])
2122-
2123- mock_object = AwaitableMock ()
2108+ mock_object = mock .AsyncMock ()
21242109 client ._client ._transport ._wrapped_methods [
21252110 client ._client ._transport .create_key
21262111 ] = mock_object
@@ -2496,12 +2481,7 @@ async def test_list_keys_async_use_cached_wrapped_rpc(transport: str = "grpc_asy
24962481 )
24972482
24982483 # Replace cached wrapped function with mock
2499- class AwaitableMock (mock .AsyncMock ):
2500- def __await__ (self ):
2501- self .await_count += 1
2502- return iter ([])
2503-
2504- mock_object = AwaitableMock ()
2484+ mock_object = mock .AsyncMock ()
25052485 client ._client ._transport ._wrapped_methods [
25062486 client ._client ._transport .list_keys
25072487 ] = mock_object
@@ -3068,12 +3048,7 @@ async def test_retrieve_legacy_secret_key_async_use_cached_wrapped_rpc(
30683048 )
30693049
30703050 # Replace cached wrapped function with mock
3071- class AwaitableMock (mock .AsyncMock ):
3072- def __await__ (self ):
3073- self .await_count += 1
3074- return iter ([])
3075-
3076- mock_object = AwaitableMock ()
3051+ mock_object = mock .AsyncMock ()
30773052 client ._client ._transport ._wrapped_methods [
30783053 client ._client ._transport .retrieve_legacy_secret_key
30793054 ] = mock_object
@@ -3449,12 +3424,7 @@ async def test_get_key_async_use_cached_wrapped_rpc(transport: str = "grpc_async
34493424 )
34503425
34513426 # Replace cached wrapped function with mock
3452- class AwaitableMock (mock .AsyncMock ):
3453- def __await__ (self ):
3454- self .await_count += 1
3455- return iter ([])
3456-
3457- mock_object = AwaitableMock ()
3427+ mock_object = mock .AsyncMock ()
34583428 client ._client ._transport ._wrapped_methods [
34593429 client ._client ._transport .get_key
34603430 ] = mock_object
@@ -3817,12 +3787,7 @@ async def test_update_key_async_use_cached_wrapped_rpc(transport: str = "grpc_as
38173787 )
38183788
38193789 # Replace cached wrapped function with mock
3820- class AwaitableMock (mock .AsyncMock ):
3821- def __await__ (self ):
3822- self .await_count += 1
3823- return iter ([])
3824-
3825- mock_object = AwaitableMock ()
3790+ mock_object = mock .AsyncMock ()
38263791 client ._client ._transport ._wrapped_methods [
38273792 client ._client ._transport .update_key
38283793 ] = mock_object
@@ -4189,12 +4154,7 @@ async def test_delete_key_async_use_cached_wrapped_rpc(transport: str = "grpc_as
41894154 )
41904155
41914156 # Replace cached wrapped function with mock
4192- class AwaitableMock (mock .AsyncMock ):
4193- def __await__ (self ):
4194- self .await_count += 1
4195- return iter ([])
4196-
4197- mock_object = AwaitableMock ()
4157+ mock_object = mock .AsyncMock ()
41984158 client ._client ._transport ._wrapped_methods [
41994159 client ._client ._transport .delete_key
42004160 ] = mock_object
@@ -4552,12 +4512,7 @@ async def test_migrate_key_async_use_cached_wrapped_rpc(
45524512 )
45534513
45544514 # Replace cached wrapped function with mock
4555- class AwaitableMock (mock .AsyncMock ):
4556- def __await__ (self ):
4557- self .await_count += 1
4558- return iter ([])
4559-
4560- mock_object = AwaitableMock ()
4515+ mock_object = mock .AsyncMock ()
45614516 client ._client ._transport ._wrapped_methods [
45624517 client ._client ._transport .migrate_key
45634518 ] = mock_object
@@ -4841,12 +4796,7 @@ async def test_get_metrics_async_use_cached_wrapped_rpc(
48414796 )
48424797
48434798 # Replace cached wrapped function with mock
4844- class AwaitableMock (mock .AsyncMock ):
4845- def __await__ (self ):
4846- self .await_count += 1
4847- return iter ([])
4848-
4849- mock_object = AwaitableMock ()
4799+ mock_object = mock .AsyncMock ()
48504800 client ._client ._transport ._wrapped_methods [
48514801 client ._client ._transport .get_metrics
48524802 ] = mock_object
@@ -5232,12 +5182,7 @@ async def test_create_firewall_policy_async_use_cached_wrapped_rpc(
52325182 )
52335183
52345184 # Replace cached wrapped function with mock
5235- class AwaitableMock (mock .AsyncMock ):
5236- def __await__ (self ):
5237- self .await_count += 1
5238- return iter ([])
5239-
5240- mock_object = AwaitableMock ()
5185+ mock_object = mock .AsyncMock ()
52415186 client ._client ._transport ._wrapped_methods [
52425187 client ._client ._transport .create_firewall_policy
52435188 ] = mock_object
@@ -5643,12 +5588,7 @@ async def test_list_firewall_policies_async_use_cached_wrapped_rpc(
56435588 )
56445589
56455590 # Replace cached wrapped function with mock
5646- class AwaitableMock (mock .AsyncMock ):
5647- def __await__ (self ):
5648- self .await_count += 1
5649- return iter ([])
5650-
5651- mock_object = AwaitableMock ()
5591+ mock_object = mock .AsyncMock ()
56525592 client ._client ._transport ._wrapped_methods [
56535593 client ._client ._transport .list_firewall_policies
56545594 ] = mock_object
@@ -6242,12 +6182,7 @@ async def test_get_firewall_policy_async_use_cached_wrapped_rpc(
62426182 )
62436183
62446184 # Replace cached wrapped function with mock
6245- class AwaitableMock (mock .AsyncMock ):
6246- def __await__ (self ):
6247- self .await_count += 1
6248- return iter ([])
6249-
6250- mock_object = AwaitableMock ()
6185+ mock_object = mock .AsyncMock ()
62516186 client ._client ._transport ._wrapped_methods [
62526187 client ._client ._transport .get_firewall_policy
62536188 ] = mock_object
@@ -6646,12 +6581,7 @@ async def test_update_firewall_policy_async_use_cached_wrapped_rpc(
66466581 )
66476582
66486583 # Replace cached wrapped function with mock
6649- class AwaitableMock (mock .AsyncMock ):
6650- def __await__ (self ):
6651- self .await_count += 1
6652- return iter ([])
6653-
6654- mock_object = AwaitableMock ()
6584+ mock_object = mock .AsyncMock ()
66556585 client ._client ._transport ._wrapped_methods [
66566586 client ._client ._transport .update_firewall_policy
66576587 ] = mock_object
@@ -7048,12 +6978,7 @@ async def test_delete_firewall_policy_async_use_cached_wrapped_rpc(
70486978 )
70496979
70506980 # Replace cached wrapped function with mock
7051- class AwaitableMock (mock .AsyncMock ):
7052- def __await__ (self ):
7053- self .await_count += 1
7054- return iter ([])
7055-
7056- mock_object = AwaitableMock ()
6981+ mock_object = mock .AsyncMock ()
70576982 client ._client ._transport ._wrapped_methods [
70586983 client ._client ._transport .delete_firewall_policy
70596984 ] = mock_object
@@ -7427,12 +7352,7 @@ async def test_reorder_firewall_policies_async_use_cached_wrapped_rpc(
74277352 )
74287353
74297354 # Replace cached wrapped function with mock
7430- class AwaitableMock (mock .AsyncMock ):
7431- def __await__ (self ):
7432- self .await_count += 1
7433- return iter ([])
7434-
7435- mock_object = AwaitableMock ()
7355+ mock_object = mock .AsyncMock ()
74367356 client ._client ._transport ._wrapped_methods [
74377357 client ._client ._transport .reorder_firewall_policies
74387358 ] = mock_object
@@ -7829,12 +7749,7 @@ async def test_list_related_account_groups_async_use_cached_wrapped_rpc(
78297749 )
78307750
78317751 # Replace cached wrapped function with mock
7832- class AwaitableMock (mock .AsyncMock ):
7833- def __await__ (self ):
7834- self .await_count += 1
7835- return iter ([])
7836-
7837- mock_object = AwaitableMock ()
7752+ mock_object = mock .AsyncMock ()
78387753 client ._client ._transport ._wrapped_methods [
78397754 client ._client ._transport .list_related_account_groups
78407755 ] = mock_object
@@ -8432,12 +8347,7 @@ async def test_list_related_account_group_memberships_async_use_cached_wrapped_r
84328347 )
84338348
84348349 # Replace cached wrapped function with mock
8435- class AwaitableMock (mock .AsyncMock ):
8436- def __await__ (self ):
8437- self .await_count += 1
8438- return iter ([])
8439-
8440- mock_object = AwaitableMock ()
8350+ mock_object = mock .AsyncMock ()
84418351 client ._client ._transport ._wrapped_methods [
84428352 client ._client ._transport .list_related_account_group_memberships
84438353 ] = mock_object
@@ -9049,12 +8959,7 @@ async def test_search_related_account_group_memberships_async_use_cached_wrapped
90498959 )
90508960
90518961 # Replace cached wrapped function with mock
9052- class AwaitableMock (mock .AsyncMock ):
9053- def __await__ (self ):
9054- self .await_count += 1
9055- return iter ([])
9056-
9057- mock_object = AwaitableMock ()
8962+ mock_object = mock .AsyncMock ()
90588963 client ._client ._transport ._wrapped_methods [
90598964 client ._client ._transport .search_related_account_group_memberships
90608965 ] = mock_object
0 commit comments