Replies: 1 comment 1 reply
-
The tutorial describes the application factory pattern https://flask.palletsprojects.com/en/2.2.x/tutorial/factory/ and how it's used in tests https://flask.palletsprojects.com/en/2.2.x/tutorial/tests/. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Since
FLASK_ENV
is now deprecated, the three environments it previously supported,production
,development
andtesting
, have reduced to two: debug mode (withFLASK_DEBUG=1
or--debug
/--debugger
) and non-debug mode.There doesn't seem to be a way to signal a test environment apart from setting
app.config['TESTING'] = True
in an app fixture, which happens during pytest runtime rather than import and init.Is there a recommended way to signal a test environment from env vars?
Beta Was this translation helpful? Give feedback.
All reactions