July 2017
Beginner to intermediate
340 pages
7h 43m
English
WebTest (http://webtest.readthedocs.io) has been around for a long time. It was written by Ian Bicking back in the days of the Paste project, and is based on the WebOb (http://docs.webob.org) project, which provides a Request and Response class similar (but not compatible) to Flask's.
WebTest wraps call to a WSGI application like FlaskTest does, and lets you interact with it. WebTest is somewhat similar to FlaskTest, with a few extra helpers when dealing with JSON, and a neat feature to call non-WSGI applications.
To use it with Flask, you can install the flask-webtest package (https://flask-webtest.readthedocs.io/), and you will get a similar integration level as Flask's native tool:
import unittest from flask_basic import ...Read now
Unlock full access