'Test that the transport notifies the avatar of disconnections.'

def test_avatar(self):

    disconnected = [False]
    def logout():
        disconnected[0] = True
    self.proto.logoutFunction = logout
    self.proto.avatar = True
    self.proto.connectionLost(None)
    self.assertTrue(disconnected[0])
