If you are referring to instantiation of an inline object, you can use this syntax
response = type('obj', (object,), {'status_code' : None, 'text' : None})
Refresh The user added a link to the flask after this answer, leaving for reference
source
share