0
0
Fork 0
mirror of https://github.com/alerta/alerta.git synced 2025-01-24 17:29:39 +00:00
alerta_alerta/tests/test_bunch.py
2013-03-03 20:22:09 +00:00

12 lines
No EOL
232 B
Python

from bunch import Bunch, bunchify, unbunchify
import json
import yaml
b = Bunch()
b = bunchify({'foo': 'bar', 'baz': ['qqr', 'abc'], 'ppp': {'a': 'b', 'c': 'd'}})
print b
print json.dumps(b)
print yaml.dump(b)
print unbunchify(b)