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.