Exemplo n.º 1
0
    def testChannel(self):
        _c.init()

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

        _c.shut_down()
Exemplo n.º 2
0
  def testChannel(self):
    _c.init()

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

    _c.shut_down()
Exemplo n.º 3
0
  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()
Exemplo n.º 4
0
 def testChannelUpDown(self):
     channel = _c.Channel('[::]:0', [])
     del channel
Exemplo n.º 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)
Exemplo n.º 6
0
 def testSecureChannelUpDown(self):
   channel = _c.Channel('[::]:0', [], _c.ClientCredentials.fake_transport_security())
   del channel
Exemplo n.º 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)