def test_ConnectionHandler_setcallback(): telnet = MockTelnet() sentinel = object() ch = ConnectionHandler(telnet) ch.setcallback(sentinel) assert telnet.callback is sentinel
def test_ConnectionHandler_write(): telnet = MockTelnet() ch = ConnectionHandler(telnet) ch.write("foo") assert telnet.written == "foo"
def test_ConnectionHandler_initialisation(): sentinel = object() ch = ConnectionHandler(sentinel) assert ch.telnet is sentinel