Skip to content

Commit

Permalink
Merge pull request #2939 from tseaver/testing-grpc-trailing_metadata
Browse files Browse the repository at this point in the history
Testing support for creating gRPC errors w/ tralling metadata.
  • Loading branch information
tseaver authored Jan 17, 2017
2 parents 885397b + 852b089 commit 7f64d75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/google/cloud/_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ class _GAXBaseAPI(object):
def __init__(self, **kw):
self.__dict__.update(kw)

def _make_grpc_error(self, status_code):
def _make_grpc_error(self, status_code, trailing=None):
from grpc._channel import _RPCState
from google.cloud.exceptions import GrpcRendezvous

details = 'Some error details.'
exc_state = _RPCState((), None, None, status_code, details)
exc_state = _RPCState((), None, trailing, status_code, details)
return GrpcRendezvous(exc_state, None, None, None)

def _make_grpc_not_found(self):
Expand Down

0 comments on commit 7f64d75

Please sign in to comment.