aboutsummaryrefslogtreecommitdiff
path: root/tests/asyncio/test_operation_async.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/asyncio/test_operation_async.py')
-rw-r--r--tests/asyncio/test_operation_async.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/asyncio/test_operation_async.py b/tests/asyncio/test_operation_async.py
index 886b1c8..26ad7ce 100644
--- a/tests/asyncio/test_operation_async.py
+++ b/tests/asyncio/test_operation_async.py
@@ -158,7 +158,7 @@ async def test_exception():
@mock.patch("asyncio.sleep", autospec=True)
@pytest.mark.asyncio
-async def test_done_with_no_error_or_response(unused_sleep):
+async def test_unexpected_result(unused_sleep):
responses = [
make_operation_proto(),
# Second operation response is done, but has not error or response.
@@ -166,9 +166,9 @@ async def test_done_with_no_error_or_response(unused_sleep):
]
future, _, _ = make_operation_future(responses)
- result = await future.result()
+ exception = await future.exception()
- assert isinstance(result, struct_pb2.Struct)
+ assert "Unexpected state" in "{!r}".format(exception)
def test_from_gapic():