Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Test Flask applications with Attest

Project Description

An extension of Flask for automated testing using Attest.


  • 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


def testapp():
    return app

frontend = Tests(context=[testapp])

def index(response):
    assert response == Response('Welcome!')
Release History

Release History

This version
History Node


Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting