jarus / flask-testing

Unittest extensions for Flask
http://pythonhosted.org/Flask-Testing/
Other
501 stars 110 forks source link

Add .text attribute for .get_data(as_text=True) #138

Open joelburton opened 5 years ago

joelburton commented 5 years ago

It's inconvenient to have to use .get_data(as_text=True) to test the textual representation of the response each time. This adds a convenience attribute, .text that lazily uses .get_data(as_text=True), similar to what .json does for JSON.