Skip to content

Commit

Permalink
test: add testcase for method_async in AsyncClient
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmayr committed Nov 8, 2023
1 parent 9b3903f commit dee09be
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/system/test_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,14 @@ async def test_retry_bubble_async(async_echo):
'message': 'This service is not available.',
},
})

# Note: This test verifies that:
# Using gapic_v1.method.wrap_method in *AsyncClient raises a RPCError (Incorrect behaviour).
# Using gapic_v1.method_async.wrap_method in *AsyncClient raises a google.api_core.exceptions.GoogleAPIError.

@pytest.mark.asyncio
async def test_method_async_wrapper_for_async_client(async_echo):
with pytest.raises(exceptions.NotFound):
await async_echo.get_operation({
'name': "operations/echo"
})

0 comments on commit dee09be

Please sign in to comment.