Added api tests for flask.