Skip to content

Instantly share code, notes, and snippets.

@marknagelberg
Created October 14, 2018 00:19
Show Gist options
  • Save marknagelberg/ecd07825d53088492a29f248482e6a5e to your computer and use it in GitHub Desktop.
Save marknagelberg/ecd07825d53088492a29f248482e6a5e to your computer and use it in GitHub Desktop.
App Deploy Application instance testing_client fixture
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