Skip to content

Commit bc4879a

Browse files
update test
1 parent 8ca6525 commit bc4879a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

ClientAdvisor/App/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@
5151

5252
def 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

ClientAdvisor/App/tests/test_app.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ def set_env_vars():
4242
@pytest.fixture
4343
def 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

5459
def 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

0 commit comments

Comments
 (0)