File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 5151
5252def create_app ():
5353 app = Quart (__name__ )
54- app .register_blueprint ( bp )
54+ app .config [ "PROVIDE_AUTOMATIC_OPTIONS" ] = True
5555 app .config ["TEMPLATES_AUTO_RELOAD" ] = True
56+ app .register_blueprint (bp )
5657 # app.secret_key = secrets.token_hex(16)
5758 # app.session_interface = SecureCookieSessionInterface()
5859 return app
Original file line number Diff line number Diff line change @@ -42,7 +42,12 @@ def set_env_vars():
4242@pytest .fixture
4343def flaskapp ():
4444 """Create a test client for the app."""
45- return create_app ()
45+ app = create_app ()
46+ app .config .update ({
47+ "TESTING" : True ,
48+ "PROVIDE_AUTOMATIC_OPTIONS" : True , # Ensure this is set in the test environment
49+ })
50+ return app
4651
4752
4853@pytest .fixture
@@ -53,6 +58,10 @@ def client(flaskapp):
5358
5459def test_create_app ():
5560 app = create_app ()
61+ app .config .update ({
62+ "TESTING" : True ,
63+ "PROVIDE_AUTOMATIC_OPTIONS" : True , # Ensure this is set in the test environment
64+ })
5665 assert app is not None
5766 assert app .name == "app"
5867 assert "routes" in app .blueprints
You can’t perform that action at this time.
0 commit comments