Optimization

This commit is contained in:
2026-02-20 15:59:19 +00:00
parent ade4689ab7
commit 383efed319
12 changed files with 168 additions and 78 deletions

View File

@@ -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