Optimization
This commit is contained in:
@@ -47,14 +47,15 @@ def test_app_has_routers():
|
||||
|
||||
def test_main_entry_point():
|
||||
"""Test main entry point calls uvicorn.run."""
|
||||
with patch("capa_de_integracion.main.uvicorn.run") as mock_run:
|
||||
with patch("capa_de_integracion.main.uvicorn.run") as mock_run, \
|
||||
patch("sys.argv", ["capa-de-integracion"]):
|
||||
main()
|
||||
|
||||
mock_run.assert_called_once()
|
||||
call_kwargs = mock_run.call_args.kwargs
|
||||
assert call_kwargs["host"] == "0.0.0.0"
|
||||
assert call_kwargs["port"] == 8080
|
||||
assert call_kwargs["reload"] is True
|
||||
assert call_kwargs["workers"] == 1
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user