def assert_error(code, response):
nt.assert_equal(response.status_code, code)
nt.assert_equal(response.content_type, 'application/json')
jr = json.loads(response.get_data(as_text=True))
nt.assert_equal(jr['status'], 'error')
nt.assert_is_not_none(jr['message'])
return jr
评论列表
文章目录