title: Flask jsonify boolean response cannot be decoded in unit tests
body: <p>I am performing tests on my Flask application and I am expecting a json response built with <code>jsonify</code>. I use the <code>ast</code> library to decode the response. But I am getting the following error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "test_index.py", line 177, in test_create_venue
      data = ast.literal_eval(rv.data)
    File "/Users/manuelgodoy/anaconda/lib/python2.7/ast.py", line 80, in literal_eval
      return _convert(node_or_string)
    File "/Users/manuelgodoy/anaconda/lib/python2.7/ast.py", line 63, in _convert
      in zip(node.keys, node.values))
    File "/Users/manuelgodoy/anaconda/lib/python2.7/ast.py", line 62, in &lt;genexpr&gt;
      return dict((_convert(k), _convert(v)) for k, v
    File "/Users/manuelgodoy/anaconda/lib/python2.7/ast.py", line 79, in _convert
      raise ValueError('malformed string')
  ValueError: malformed string
  </code></pre>
  
  <p>My test function is as follows:</p>
  
  <pre><code>def test_create_venue(self):
      rv = self.app.get("/data_send")
      data = ast.literal_eval(rv.data)
      self.assertTrue(data["Sent"])
  </code></pre>
  
  <p>And the application's function is:</p>
  
  <pre><code>@app.route('/data_send', methods = ['GET'])
  def data_send():
      usr = User.get_by_id(g.user.key.id())
      usr.get_last_order().set_as_posted()
      rest = usr.restaurant
      for c in rest.channel_set():
          try:
              channel.send_message(c.cid, 'ping')
          except:
              return jsonify(Sent = False)
      return jsonify(Sent = True)
  </code></pre>
  
  <p>Jsonify is sending the following response:</p>
  
  <pre><code>'{\n  "Sent": true\n}'
  </code></pre>
  
  <p>But <code>ast</code> does not recognize the lower case <code>true</code> as Boolean. Hence, it raises a <code>ValueError</code>. </p>
  
  <p>Any idea how to transform <code>jsonify</code>'s response into a <code>Dict</code> that maintains the Boolean value so I can perform the Boolean assertion?</p>