Created
October 14, 2018 00:19
-
-
Save marknagelberg/ecd07825d53088492a29f248482e6a5e to your computer and use it in GitHub Desktop.
App Deploy Application instance testing_client fixture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from app import create_app | |
@pytest.yield_fixture(scope='module') | |
def test_client(): | |
app = create_app('testing') | |
testing_client = app.test_client() | |
ctx = app.app_context() | |
ctx.push() | |
yield testing_client | |
ctx.pop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment