我试图为FlaskJSONAPI编写一个测试套件,但似乎无法将{"form_id": "data"}
传递到app.test_client() post()
方法的json=
参数中。在
{"form_i": "data"}
工作正常,我尝试过设置各种编码选项,但没有任何运气。在
with app.test_client() as c:
test_call = c.post("api/signup/", json={'form_id': 'hi'})
给出以下错误消息:
^{pr2}$
Tags:
把这个推荐给你
^{pr2}$Nevermind,原来是另一个错误-调用了一个单独的JSON文件,忘记删除一个尾随逗号。。。
相关问题 更多 >
编程相关推荐