Skip to content

Commit 4baa162

Browse files
authored
Merge pull request googleapis#2939 from tseaver/testing-grpc-trailing_metadata
Testing support for creating gRPC errors w/ tralling metadata.
2 parents 602b079 + dc99962 commit 4baa162

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/google/cloud/_testing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ class _GAXBaseAPI(object):
7979
def __init__(self, **kw):
8080
self.__dict__.update(kw)
8181

82-
def _make_grpc_error(self, status_code):
82+
def _make_grpc_error(self, status_code, trailing=None):
8383
from grpc._channel import _RPCState
8484
from google.cloud.exceptions import GrpcRendezvous
8585

8686
details = 'Some error details.'
87-
exc_state = _RPCState((), None, None, status_code, details)
87+
exc_state = _RPCState((), None, trailing, status_code, details)
8888
return GrpcRendezvous(exc_state, None, None, None)
8989

9090
def _make_grpc_not_found(self):

0 commit comments

Comments
 (0)