Пример #1
0
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
Пример #2
0
    def _callFUT(self, exc):
        from google.cloud.firestore_v1.watch import _maybe_wrap_exception

        return _maybe_wrap_exception(exc)
    def _callFUT(self, exc):
        from google.cloud.firestore_v1.watch import _maybe_wrap_exception

        return _maybe_wrap_exception(exc)
Пример #4
0
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