Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove test app context #93

Merged
merged 3 commits into from
Mar 3, 2023
Merged

Remove test app context #93

merged 3 commits into from
Mar 3, 2023

Conversation

rsyring
Copy link
Member

@rsyring rsyring commented Oct 23, 2017

@codecov
Copy link

codecov bot commented Oct 23, 2017

Codecov Report

Merging #93 (cbee452) into master (623f444) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

❗ Current head cbee452 differs from pull request most recent head f9e8ad3. Consider uploading reports for the commit f9e8ad3 to get more accurate results

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
- Coverage   89.37%   89.28%   -0.09%     
==========================================
  Files          30       29       -1     
  Lines        2399     2379      -20     
  Branches      224      219       -5     
==========================================
- Hits         2144     2124      -20     
  Misses        185      185              
  Partials       70       70              

Don't create an application context during testing.  See #90 for
more info on the reason why this was problematic.  Adjust test
fixtures to compensate.

BREAKING CHANGE
---------------

No longer initializing an app context means that flask.current_app
as well as keg.db.db operations may fail where they did not
previously.  You will need to adjust your test fixtures to either
get the app instance directly or create the app context as needed.

The changes to our tests in this commit will provide good examples
of different kinds of fixture usage that can be used to work around
this change.
@guruofgentoo guruofgentoo merged commit 046ce40 into master Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove "fix" for flask-wtf "bug" Incorrect usage of Flask's app context during testing
2 participants