Ejemplo n.º 1
0
 def coro():
     h = GNTPHandler(loop=loop)
     logging.debug('GNTP: connect')
     yield from h.connect(local_target)
     assert local_target.handler == h
Ejemplo n.º 2
0
    def coro():
        h = GNTPHandler(loop=loop)
        t = Target('gntp://%s' % INVALID_HOST)

        with pytest.raises((ConnectionError, TimeoutError)):
            _protocol = yield from h.connect(t)