def test_innerProtocolInRepr(self):
        """
        Verify that L{AMP} objects output their innerProtocol when set.
        """
        otherProto = TestProto(None, b"outgoing data")
        a = amp.AMP()
        a.innerProtocol = otherProto

        self.assertEqual(
            repr(a), "<AMP inner <TestProto #%d> at 0x%x>" % (
                otherProto.instanceId, id(a)))

        Verify that L{AMP} objects output their innerProtocol when set.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_amp.py