コード例 #1
0
    def testChannel(self):
        _c.init()

        channel = _c.Channel('test host:12345', None)
        del channel

        _c.shut_down()
コード例 #2
0
ファイル: _c_test.py プロジェクト: gaccob/grpc
  def testChannel(self):
    _c.init()

    channel = _c.Channel(
        'test host:12345', None, server_host_override='ignored')
    del channel

    _c.shut_down()
コード例 #3
0
ファイル: _c_test.py プロジェクト: wfarr/grpc
  def testCall(self):
    method = 'test method'
    host = 'test host'

    _c.init()

    channel = _c.Channel('%s:%d' % (host, 12345), None)
    call = _c.Call(channel, method, host, time.time() + _TIMEOUT)
    del call
    del channel

    _c.shut_down()
コード例 #4
0
 def testChannelUpDown(self):
     channel = _c.Channel('[::]:0', [])
     del channel
コード例 #5
0
 def __init__(self, target, args, creds=None):
     args = list(args) + [(_c.PRIMARY_USER_AGENT_KEY, _USER_AGENT)]
     if creds is None:
         self.channel = _c.Channel(target, args)
     else:
         self.channel = _c.Channel(target, args, creds)
コード例 #6
0
 def testSecureChannelUpDown(self):
   channel = _c.Channel('[::]:0', [], _c.ClientCredentials.fake_transport_security())
   del channel
コード例 #7
0
 def __init__(self, target, args, creds=None):
     if creds is None:
         self.channel = _c.Channel(target, args)
     else:
         self.channel = _c.Channel(target, args, creds)