Exemplo n.º 1
0
 def test_output(self):
     renderer = XmlRenderer()
     output = renderer(sample_view_model())
     assert output == '<?xml version="1.0" encoding="utf-8" ?><test><nodes><node>Testing</node><node>Another node</node></nodes></test>'
Exemplo n.º 2
0
 def test_output(self):
     renderer = JsonRenderer()
     output = renderer(sample_view_model())
     assert output == '{"test": {"nodes": {"node": ["Testing", "Another node"]}}}'