Skip to content

Instantly share code, notes, and snippets.

@sportebois
Last active October 13, 2020 16:38
Show Gist options
  • Save sportebois/1cb5c470552e79e03509bc983b752f6e to your computer and use it in GitHub Desktop.
Save sportebois/1cb5c470552e79e03509bc983b752f6e to your computer and use it in GitHub Desktop.
Update the common fixture to trigger a new one which will started an exposer thread
@pytest.fixture
- def test_client():
+ def test_client(exposer_thread):
configure_app(flask_app, config_name=Environments.TESTS)
# I use this a lot for custom Test client classes to inject custom things
my_project.app.test_client_class = CustomApiTestClient
client = my_project.app.test_client
yield client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment