def test_serializeIRenderable(self):
        """
        Test that flattening respects all of the IRenderable interface.
        """
        @implementer(IRenderable)
        class FakeElement(object):
            def render(ign,ored):
                return tags.p(
                    'hello, ',
                    tags.transparent(render='test'), ' - ',
                    tags.transparent(render='test'))
            def lookupRenderMethod(ign, name):
                self.assertEqual(name, 'test')
                return lambda ign, node: node('world')

        return gatherResults([
            self.assertFlattensTo(FakeElement(), b'<p>hello, world - world</p>'),
        ])

        Test that flattening respects all of the IRenderable interface.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_flatten.py