File: test_pprint.py

package info (click to toggle)
python-zeep 4.3.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,600 kB
  • sloc: python: 15,551; makefile: 13
file content (18 lines) | stat: -rw-r--r-- 439 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from zeep.xsd import printer


def test_dict():
    pprint = printer.PrettyPrinter()
    data = {
        "foo": "bar",
        "foo_2": "bar",
        "foo_3": "bar",
        "foo_4": {"foo": "1", "bar": {"bala": "qwe"}, "x": [1, 2, 3, 4], "y": []},
    }
    pprint.pformat(data)


def test_list():
    pprint = printer.PrettyPrinter()
    data = [{"foo": "bar", "foo_2": "bar"}, {"foo": "bar", "foo_2": "bar"}]
    pprint.pformat(data)