def test_anonymousLogin(self):
        """
        Verify that a PB server using a portal configured with a checker which
        allows IAnonymous credentials can be logged into using IAnonymous
        credentials.
        """
        self.portal.registerChecker(checkers.AllowAnonymousAccess())
        d = self.clientFactory.login(credentials.Anonymous(), "BRAINS!")

        def cbLoggedIn(perspective):
            return perspective.callRemote('echo', 123)
        d.addCallback(cbLoggedIn)

        d.addCallback(self.assertEqual, 123)

        self.establishClientAndServer()
        self.pump.flush()
        return d

        Verify that a PB server using a portal configured with a checker which
        allows IAnonymous credentials can be logged into using IAnonymous
        credentials.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/spread/test/test_pb.py