Flask-Attest 0.1dev
Test Flask applications with Attest
An extension of Flask for automated testing using Attest.
Features:
- Flask-like API
- Handling of request contexts in tests
- Captures metadata about rendered templates
- Flexible library with few assumptions
- Write test conditions naturally with the assert statement
from flaskext.attest import request_context, get
from myapp import app
from attest import Tests
from flask import Response
TESTING = True
@request_context
def testapp():
app.config.from_object(__name__)
return app
frontend = Tests(context=[testapp])
@frontend.test
@get('/')
def index(response):
assert response == Response('Welcome!')
- Author: Dag Odenhall
- Documentation: Flask-Attest package documentation
- Home Page: https://github.com/dag/flask-attest
- License: Simplified BSD
-
Categories
- Development Status :: 4 - Beta
- Environment :: Console
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Programming Language :: Python :: 2.5
- Programming Language :: Python :: 2.6
- Programming Language :: Python :: 2.7
- Topic :: Internet :: WWW/HTTP :: WSGI
- Topic :: Software Development :: Testing
- Package Index Owner: dag
- DOAP record: Flask-Attest-0.1dev.xml
