File: conftest.py

package info (click to toggle)
flask-security 5.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,420 kB
  • sloc: python: 23,164; javascript: 204; makefile: 138
file content (19 lines) | stat: -rw-r--r-- 422 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright 2019 by J. Christopher Wagner (jwag). All rights reserved.
import pytest


@pytest.fixture
def myapp():
    """
    Create a wrapped flask app.
    This is used for unittests that want to mock out all
    underlying singletons (e.g. blog).

    Assumes that app.security has been set.
    """

    from fsqlalchemy1.app import create_app

    app = create_app()
    app.config["TESTING"] = True
    return app