BAI-29: add Docker deployment
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
multica-agent
parent
24d645b77c
commit
cf082d04e4
@@ -0,0 +1,17 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
from unittest import TestCase
|
||||
from unittest.mock import patch
|
||||
|
||||
import server
|
||||
|
||||
|
||||
class ServerConfigurationTests(TestCase):
|
||||
@patch.dict(os.environ, {"APP_HOST": "0.0.0.0", "APP_PORT": "8080"})
|
||||
@patch("server.ThreadingHTTPServer")
|
||||
def test_main_uses_configured_host_and_port(self, http_server) -> None:
|
||||
server.main()
|
||||
|
||||
http_server.assert_called_once_with(("0.0.0.0", 8080), server.AppHandler)
|
||||
http_server.return_value.serve_forever.assert_called_once_with()
|
||||
Reference in New Issue
Block a user