def test_lost_connection_callback_calling(): l = LoggerIn() called = [] l.connection_lost_callback = lambda: called.append(None) l.connectionLost(None) assert called