def coro(): h = GNTPHandler(loop=loop) logging.debug('GNTP: connect') yield from h.connect(local_target) assert local_target.handler == h
def coro(): h = GNTPHandler(loop=loop) t = Target('gntp://%s' % INVALID_HOST) with pytest.raises((ConnectionError, TimeoutError)): _protocol = yield from h.connect(t)