Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for test_startup_shutdown_handlers_as_parameters (0.42 seconds)

  1. tests/test_router_events.py

            assert response.json() == {"message": "Hello World"}
        assert state.app_startup is True
        assert state.app_shutdown is True
    
    
    def test_startup_shutdown_handlers_as_parameters(state: State) -> None:
        """Test that startup/shutdown handlers passed as parameters to FastAPI are called correctly."""
    
        def app_startup() -> None:
            state.app_startup = True
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 11.7K bytes
    - Click Count (0)
Back to Top