All Projects → pytest-dev → Pytest Flask

pytest-dev / Pytest Flask

Licence: mit
A set of pytest fixtures to test Flask applications

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytest Flask

Data Driven Web Apps With Flask
Course demo code and other hand-out materials for our data-driven web apps in Flask course
Stars: ✭ 388 (+8.08%)
Mutual labels:  flask, unit-testing
Flask Sqlalchemy
Adds SQLAlchemy support to Flask
Stars: ✭ 3,658 (+918.94%)
Mutual labels:  flask
Flask Appbuilder
Simple and rapid application development framework, built on top of Flask. includes detailed security, auto CRUD generation for your models, google charts and much more. Demo (login with guest/welcome) - http://flaskappbuilder.pythonanywhere.com/
Stars: ✭ 3,603 (+903.62%)
Mutual labels:  flask
Tasking Manager
Tasking Manager - The tool to team up for mapping in OpenStreetMap
Stars: ✭ 328 (-8.64%)
Mutual labels:  flask
Flask Smorest
DB agnostic framework to build auto-documented REST APIs with Flask and marshmallow
Stars: ✭ 317 (-11.7%)
Mutual labels:  flask
Redis Monitor
💻 A very simple redis monitor based on Flask and React. 一个部署简单的 redis 监控程序,使用 Flask 和 React 完成。
Stars: ✭ 330 (-8.08%)
Mutual labels:  flask
Renrenbackup
A backup tool for renren.com
Stars: ✭ 309 (-13.93%)
Mutual labels:  flask
Head First Flask
📙Introduction to Flask Web development.
Stars: ✭ 355 (-1.11%)
Mutual labels:  flask
Cmdb
CMDB: configuration and management of IT resources, demo: http://121.42.12.46:8000
Stars: ✭ 337 (-6.13%)
Mutual labels:  flask
Gather Deployment
Gathers scalable tensorflow and infrastructure deployment
Stars: ✭ 326 (-9.19%)
Mutual labels:  flask
Flask Bookshelf
Flask Series
Stars: ✭ 327 (-8.91%)
Mutual labels:  flask
Prometheus flask exporter
Prometheus exporter for Flask applications
Stars: ✭ 318 (-11.42%)
Mutual labels:  flask
Ssdbadmin
SSDB可视化界面管理工具 ssdb web manager tool
Stars: ✭ 336 (-6.41%)
Mutual labels:  flask
Firebase Mock
Firebase mock library for writing unit tests
Stars: ✭ 319 (-11.14%)
Mutual labels:  unit-testing
Flask Session
Server side session extension for Flask
Stars: ✭ 344 (-4.18%)
Mutual labels:  flask
Deepchatmodels
Conversation models in TensorFlow. (website removed)
Stars: ✭ 312 (-13.09%)
Mutual labels:  flask
Ctfd
CTFs as you need them
Stars: ✭ 3,768 (+949.58%)
Mutual labels:  flask
Eth Gas Reporter
Gas usage per unit test. Average gas usage per method. A mocha reporter.
Stars: ✭ 330 (-8.08%)
Mutual labels:  unit-testing
Responder
A familiar HTTP Service Framework for Python.
Stars: ✭ 3,569 (+894.15%)
Mutual labels:  flask
Microblog
A microblogging web application written in Python and Flask that I developed as part of my Flask Mega-Tutorial series.
Stars: ✭ 3,788 (+955.15%)
Mutual labels:  flask

pytest-flask

.. image:: https://img.shields.io/pypi/v/pytest-flask.svg :target: https://pypi.python.org/pypi/pytest-flask :alt: PyPi version

.. image:: https://img.shields.io/conda/vn/conda-forge/pytest-flask.svg :target: https://anaconda.org/conda-forge/pytest-flask :alt: conda-forge version

.. image:: https://github.com/pytest-dev/pytest-flask/workflows/build/badge.svg :target: https://github.com/pytest-dev/pytest-flask/actions :alt: CI status

.. image:: https://img.shields.io/pypi/pyversions/pytest-flask.svg :target: https://pypi.org/project/pytest-flask :alt: PyPi downloads

.. image:: https://readthedocs.org/projects/pytest-flask/badge/?version=latest :target: https://pytest-flask.readthedocs.org/en/latest/ :alt: Documentation status

.. image:: https://img.shields.io/maintenance/yes/2021?color=blue :target: https://github.com/pytest-dev/pytest-flask :alt: Maintenance

.. image:: https://img.shields.io/github/last-commit/pytest-dev/pytest-flask?color=blue :target: https://github.com/pytest-dev/pytest-flask/commits/master :alt: GitHub last commit

.. image:: https://img.shields.io/github/issues-pr-closed-raw/pytest-dev/pytest-flask?color=blue :target: https://github.com/pytest-dev/pytest-flask/pulls?q=is%3Apr+is%3Aclosed :alt: GitHub closed pull requests

.. image:: https://img.shields.io/github/issues-closed/pytest-dev/pytest-flask?color=blue :target: https://github.com/pytest-dev/pytest-flask/issues?q=is%3Aissue+is%3Aclosed :alt: GitHub closed issues

.. image:: https://img.shields.io/pypi/dm/pytest-flask?color=blue :target: https://pypi.org/project/pytest-flask/ :alt: PyPI - Downloads

.. image:: https://img.shields.io/github/languages/code-size/pytest-dev/pytest-flask?color=blue :target: https://github.com/pytest-dev/pytest-flask :alt: Code size

.. image:: https://img.shields.io/badge/license-MIT-blue.svg?color=blue :target: https://github.com/pytest-dev/pytest-flask/blob/master/LICENSE :alt: License

.. image:: https://img.shields.io/github/issues-raw/pytest-dev/pytest-flask.svg?color=blue :target: https://github.com/pytest-dev/pytest-flask/issues :alt: Issues

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black :alt: style

An extension of pytest_ test runner which provides a set of useful tools to simplify testing and development of the Flask extensions and applications.

To view a more detailed list of extension features and examples go to the PyPI_ overview page or package documentation_.

How to start?

Considering the minimal flask application factory_ bellow in myapp.py as an example:

.. code-block:: python

from flask import Flask

def create_app(config_filename): # create a minimal app app = Flask(name) app.config.from_pyfile(config_filename)

  # simple hello world view
  @app.route('/hello')
  def hello():
     return 'Hello, World!'

  return app

You first need to define your application fixture in conftest.py:

.. code-block:: python

from myapp import create_app

@pytest.fixture
def app():
    app = create_app()
    return app

Finally, install the extension with dependencies and run your test suite::

$ pip install pytest-flask
$ pytest

Contributing

Don’t hesitate to create a GitHub issue_ for any bug or suggestion. For more information check our contribution guidelines_.

.. _pytest: https://docs.pytest.org/en/stable/ .. _PyPI: https://pypi.python.org/pypi/pytest-flask .. _Github issue: https://github.com/vitalk/pytest-flask/issues .. _package documentation: http://pytest-flask.readthedocs.org/en/latest/ .. _guidelines: https://github.com/pytest-dev/pytest-flask/blob/master/CONTRIBUTING.rst .. _application factory: https://flask.palletsprojects.com/en/1.1.x/patterns/appfactories/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].