def test_json(self):
self.app.route('/')(lambda: {'a': 1})
try:
self.assertBody(bottle.json_dumps({'a': 1}))
self.assertHeader('Content-Type','application/json')
except ImportError:
warn("Skipping JSON tests.")
评论列表
文章目录