Beispiel #1
0
 def testUseInvalidWatchFnTypeWithGrpcDebugWrapperSessionRaisesException(self):
   sess = session.Session(
       config=session_debug_testlib.no_rewrite_session_config())
   with self.assertRaises(TypeError):
     grpc_wrapper.GrpcDebugWrapperSession(
         sess, "localhost:%d" % self._server_port, watch_fn="foo")
 def testConstructGrpcDebugWrapperSessionWithInvalidTypeRaisesException(self):
   sess = session.Session(
       config=session_debug_testlib.no_rewrite_session_config())
   with self.assertRaisesRegexp(
       TypeError, "Expected type str or list in grpc_debug_server_addresses"):
     grpc_wrapper.GrpcDebugWrapperSession(sess, 1337)
 def testConstructGrpcDebugWrapperSessionWithInvalidTypeRaisesException2(self):
   sess = session.Session(config=no_rewrite_session_config())
   with self.assertRaisesRegexp(
       TypeError, "Expected type str in list grpc_debug_server_addresses"):
     grpc_wrapper.GrpcDebugWrapperSession(sess, ["localhost:1337", 1338])