ianbuss commented on code in PR #43817:
URL: https://github.com/apache/airflow/pull/43817#discussion_r1834221476


##########
tests/api_fastapi/test_app.py:
##########
@@ -19,6 +19,15 @@
 from unittest import mock
 
 
+def test_main_app_lifespan(client):
+    with client() as test_client:
+        test_app = test_client.app
+
+        # assert the app was created and lifespan was called
+        assert test_app
+        assert test_app.state.lifespan_called, "Lifespan not called on 
Execution API app."

Review Comment:
   No indeed :) That's why the test is called `test_main_app_lifespan` and 
there's one for the execution app below. And yes, each app has its own 
starlette state object.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to