@@ -24,7 +24,7 @@ def test_cli_config_has_correct_default_values() -> None:
2424
2525 assert config .host == "0.0.0.0" # noqa: S104
2626 assert config .port == 5000
27- assert config .log_level == 20
27+ assert config .log_level == "info"
2828 assert config .lambda_endpoint == "http://127.0.0.1:3001"
2929 assert config .local_runner_endpoint == "http://0.0.0.0:5000"
3030 assert config .local_runner_region == "us-west-2"
@@ -38,7 +38,7 @@ def test_cli_config_from_environment_uses_defaults_when_no_env_vars() -> None:
3838
3939 assert config .host == "0.0.0.0" # noqa: S104
4040 assert config .port == 5000
41- assert config .log_level == 20
41+ assert config .log_level == "info"
4242 assert config .lambda_endpoint == "http://127.0.0.1:3001"
4343 assert config .local_runner_endpoint == "http://0.0.0.0:5000"
4444 assert config .local_runner_region == "us-west-2"
@@ -50,7 +50,7 @@ def test_cli_config_from_environment_uses_all_env_vars_when_set() -> None:
5050 env_vars = {
5151 "AWS_DEX_HOST" : "127.0.0.1" ,
5252 "AWS_DEX_PORT" : "8080" ,
53- "AWS_DEX_LOG_LEVEL" : "10 " ,
53+ "AWS_DEX_LOG_LEVEL" : "debug " ,
5454 "AWS_DEX_LAMBDA_ENDPOINT" : "http://localhost:4000" ,
5555 "AWS_DEX_LOCAL_RUNNER_ENDPOINT" : "http://localhost:8080" ,
5656 "AWS_DEX_LOCAL_RUNNER_REGION" : "us-east-1" ,
@@ -62,7 +62,7 @@ def test_cli_config_from_environment_uses_all_env_vars_when_set() -> None:
6262
6363 assert config .host == "127.0.0.1"
6464 assert config .port == 8080
65- assert config .log_level == 10
65+ assert config .log_level == "debug"
6666 assert config .lambda_endpoint == "http://localhost:4000"
6767 assert config .local_runner_endpoint == "http://localhost:8080"
6868 assert config .local_runner_region == "us-east-1"
@@ -82,7 +82,7 @@ def test_cli_config_from_environment_uses_partial_env_vars_with_defaults() -> No
8282 assert config .host == "192.168.1.1"
8383 assert config .port == 9000
8484 # Other values should be defaults
85- assert config .log_level == 20
85+ assert config .log_level == "info"
8686 assert config .lambda_endpoint == "http://127.0.0.1:3001"
8787
8888
@@ -173,7 +173,7 @@ def test_start_server_command_parses_arguments_correctly() -> None:
173173 "--port" ,
174174 "8080" ,
175175 "--log-level" ,
176- "10 " ,
176+ "debug " ,
177177 "--lambda-endpoint" ,
178178 "http://localhost:4000" ,
179179 "--local-runner-endpoint" ,
@@ -303,7 +303,7 @@ def test_logging_configuration_uses_specified_log_level() -> None:
303303 with patch ("logging.basicConfig" ) as mock_basic_config :
304304 with patch ("sys.stdout" , new_callable = StringIO ):
305305 with patch .object (app , "start_server_command" , return_value = 0 ):
306- app .run (["start-server" , "--log-level" , "10 " ])
306+ app .run (["start-server" , "--log-level" , "debug " ])
307307
308308 mock_basic_config .assert_called_once ()
309309 call_args = mock_basic_config .call_args
@@ -348,7 +348,7 @@ def test_start_server_command_works_with_mocked_dependencies() -> None:
348348 "--port" ,
349349 "8080" ,
350350 "--log-level" ,
351- "10 " ,
351+ "debug " ,
352352 ]
353353 )
354354
@@ -359,7 +359,7 @@ def test_start_server_command_works_with_mocked_dependencies() -> None:
359359 call_args = mock_web_runner .call_args [0 ][0 ] # First positional argument
360360 assert call_args .web_service .host == "127.0.0.1"
361361 assert call_args .web_service .port == 8080
362- assert call_args .web_service .log_level == 10
362+ assert call_args .web_service .log_level == "debug"
363363
364364
365365def test_start_server_command_handles_server_startup_errors () -> None :
@@ -398,7 +398,7 @@ def test_start_server_command_creates_correct_web_runner_config() -> None:
398398 "--port" ,
399399 "9000" ,
400400 "--log-level" ,
401- "30 " ,
401+ "warning " ,
402402 "--lambda-endpoint" ,
403403 "http://custom-lambda:4000" ,
404404 "--local-runner-endpoint" ,
@@ -419,7 +419,7 @@ def test_start_server_command_creates_correct_web_runner_config() -> None:
419419 # Verify web service configuration
420420 assert config .web_service .host == "192.168.1.100"
421421 assert config .web_service .port == 9000
422- assert config .web_service .log_level == 30
422+ assert config .web_service .log_level == "warning"
423423
424424 # Verify Lambda service configuration
425425 assert config .lambda_endpoint == "http://custom-lambda:4000"
0 commit comments