def test_removeAllIdentities(self):
        """
        Assert that we can remove all identities.
        """
        d = self.client.removeAllIdentities()
        self.pump.flush()

        def _check(ignored):
            self.assertEqual(0, len(self.server.factory.keys))
        return d.addCallback(_check)

        Assert that we can remove all identities.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_agent.py