示例#1
0
 def test_json_output_handles_decimals_in_lists(self):
     f = Form()
     f.line1 = [["First Bank", Decimal('1.23')],
                ["Second Bank", Decimal('4.56')]]
     assert dump_json(f) == dedent(u'''\
         {
          "inputs": {
           "line1": [
            [
             "First Bank",
             "1.23"
            ],
            [
             "Second Bank",
             "4.56"
            ]
           ]
          },
          "outputs": {}
         }
         ''')