Reputation: 179
I am trying to test the PUT endpoint using webtest module for that. Here is what I am trying to do.
update_user = {'lName': 'TEST'}
live_testapp.put_json(
'/v1/user/{uuid},',
params=(uuid, update_user),
headers={
'Authorization': 'Bearer {}'.format(token),
'Content-Type': 'application/json'
},
status=200
)
I am getting following error when I try to run the test:
webtest.app.AppError: Bad response: 400 BAD REQUEST (not 200)
E { "detail": "[\'da5a75c4-eabd-4d48-adeb-ff9b31b0bbce\',
{\'lName\': \'TEST\'}] is not of type \'object\'",\n "status": 400,\n
"title": "Bad Request",\n "type": "about:blank"\n}
Upvotes: 0
Views: 701