File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -706,7 +706,9 @@ async def test_infer_info_logs_omit_user_supplied_content(
706706 ),
707707 )
708708
709- with caplog .at_level (logging .INFO , logger = "lightspeed_stack.app.endpoints.rlsapi_v1" ):
709+ with caplog .at_level (
710+ logging .INFO , logger = f"{ constants .DEFAULT_LOGGER_NAME } ..app.endpoints.rlsapi_v1"
711+ ):
710712 await infer_endpoint (
711713 infer_request = infer_request ,
712714 request = mock_request_factory (),
@@ -786,7 +788,10 @@ async def test_infer_api_status_error_logs_class_without_private_text(
786788 caplog : pytest .LogCaptureFixture ,
787789) -> None :
788790 """Test API status error logs omit raw exception text."""
789- with caplog .at_level (logging .ERROR , logger = "lightspeed_stack.app.endpoints.rlsapi_v1" ):
791+ with caplog .at_level (
792+ logging .ERROR ,
793+ logger = f"{ constants .DEFAULT_LOGGER_NAME } ..app.endpoints.rlsapi_v1" ,
794+ ):
790795 with pytest .raises (HTTPException ) as exc_info :
791796 await infer_endpoint (
792797 infer_request = RlsapiV1InferRequest (question = "Test question" ),
Original file line number Diff line number Diff line change 1717 AzureEntraIDManager ,
1818)
1919from configuration import AzureEntraIdConfiguration
20+ from constants import DEFAULT_LOGGER_NAME
2021
2122
2223@pytest .fixture (name = "dummy_config" )
@@ -137,7 +138,8 @@ def test_refresh_token_failure_logs_error(
137138 )
138139
139140 with caplog .at_level (
140- "WARNING" , logger = "lightspeed_stack.authorization.azure_token_manager"
141+ "WARNING" ,
142+ logger = f"{ DEFAULT_LOGGER_NAME } ..authorization.azure_token_manager" ,
141143 ):
142144 result = token_manager .refresh_token ()
143145
Original file line number Diff line number Diff line change 66import pytest
77from pydantic import ValidationError
88
9+ from constants import DEFAULT_LOGGER_NAME
910from models .config import Configuration , RlsapiV1Configuration
1011
1112# --- Test RlsapiV1Configuration ---
@@ -133,7 +134,9 @@ def test_quota_subject_warns_when_no_limiters(caplog: pytest.LogCaptureFixture)
133134 authentication = {"module" : "noop" },
134135 quota_handlers = {},
135136 )
136- with caplog .at_level (logging .WARNING , logger = "lightspeed_stack.models.config" ):
137+ with caplog .at_level (
138+ logging .WARNING , logger = f"{ DEFAULT_LOGGER_NAME } ..models.config"
139+ ):
137140 Configuration (** config_dict )
138141
139142 assert "quota enforcement is not fully configured" in caplog .text
@@ -158,7 +161,9 @@ def test_quota_subject_warns_when_no_storage_backend(
158161 ],
159162 },
160163 )
161- with caplog .at_level (logging .WARNING , logger = "lightspeed_stack.models.config" ):
164+ with caplog .at_level (
165+ logging .WARNING , logger = f"{ DEFAULT_LOGGER_NAME } ..models.config"
166+ ):
162167 Configuration (** config_dict )
163168
164169 assert "quota enforcement is not fully configured" in caplog .text
You can’t perform that action at this time.
0 commit comments