def test_render_recursive(self): out = [] with mock.patch("click.echo", out.append): cci.render_recursive( { "test": [ OrderedDict( ( ("list", ["list"]), ("dict", {"key": "value"}), ("str", "str"), ) ) ] } ) self.assertEqual( """\x1b[1mtest:\x1b[0m - \x1b[1mlist:\x1b[0m - list \x1b[1mdict:\x1b[0m \x1b[1mkey:\x1b[0m value \x1b[1mstr:\x1b[0m str""", "\n".join(out), )
def test_render_recursive(self): out = [] with mock.patch("click.echo", out.append): cci.render_recursive( { "test": [ OrderedDict( ( ("list", ["list"]), ("dict", {"key": "value"}), ("str", "str"), ) ) ] } ) self.assertEqual( """\x1b[1mtest:\x1b[0m - \x1b[1mlist:\x1b[0m - list \x1b[1mdict:\x1b[0m \x1b[1mkey:\x1b[0m value \x1b[1mstr:\x1b[0m str""", "\n".join(out), )
def test_render_recursive(self): out = [] with mock.patch("click.echo", out.append): cci.render_recursive( {"test": [{"list": ["list"], "dict": {"key": "value"}, "str": "str"}]} ) self.assertEqual( """\x1b[1mtest:\x1b[0m - \x1b[1mlist:\x1b[0m - list \x1b[1mdict:\x1b[0m \x1b[1mkey:\x1b[0m value \x1b[1mstr:\x1b[0m str""", "\n".join(out), )