We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3b1059 commit c0ac8e1Copy full SHA for c0ac8e1
1 file changed
tests/unit/runners/test_uvicorn_runner.py
@@ -189,3 +189,16 @@ def test_start_uvicorn_respects_debug_log_level(
189
access_log=True,
190
log_config={},
191
)
192
+
193
194
+def test_start_uvicorn_no_log_config(mocker: MockerFixture) -> None:
195
+ """Test that the default logging config is used when none is provided."""
196
+ configuration = ServiceConfiguration(
197
+ host="localhost", port=8080, workers=1
198
+ ) # pyright: ignore[reportCallIssue]
199
200
+ mock_setup_logging = mocker.patch("runners.uvicorn.setup_logging")
201
+ mock_setup_logging.side_effect = ValueError("Raised intentionally")
202
203
+ with pytest.raises(ValueError, match="Raised intentionally"):
204
+ start_uvicorn(configuration)
0 commit comments