def test__maybe_wrap_exception_w_grpc_error(): import grpc from google.api_core.exceptions import GoogleAPICallError from google.cloud.firestore_v1.watch import _maybe_wrap_exception exc = grpc.RpcError() result = _maybe_wrap_exception(exc) assert result.__class__ == GoogleAPICallError
def _callFUT(self, exc): from google.cloud.firestore_v1.watch import _maybe_wrap_exception return _maybe_wrap_exception(exc)
def test__maybe_wrap_exception_w_non_grpc_error(): from google.cloud.firestore_v1.watch import _maybe_wrap_exception exc = ValueError() result = _maybe_wrap_exception(exc) assert result.__class__ == ValueError