1

I am trying to create a pytest for a flask REST server.

In one of the tests, i want to get the server's response.

This is the server's response:

return make_response(json.dumps({'myName': userName}), 200)

And this is what i am using in order to access it:

myFileId = response.json()['myName']

However, i get this error:

TypeError: 'NoneType' object is not callable

I also tried this: response.myName but this does not work obviously.

davidism
  • 121,510
  • 29
  • 395
  • 339
user1584421
  • 3,499
  • 11
  • 46
  • 86

0 Answers0