forked from phoenix/litellm-mirror
fix(test_proxy_reject_logging.py): fix test
This commit is contained in:
parent
fd11f63f71
commit
6090fd37fa
3 changed files with 20 additions and 17 deletions
|
@ -1607,6 +1607,7 @@ class Logging:
|
|||
)
|
||||
== False
|
||||
): # custom logger class
|
||||
|
||||
callback.log_failure_event(
|
||||
start_time=start_time,
|
||||
end_time=end_time,
|
||||
|
|
|
@ -585,6 +585,7 @@ class ProxyLogging:
|
|||
**request_data,
|
||||
)
|
||||
|
||||
if litellm_logging_obj is not None:
|
||||
# log the custom exception
|
||||
await litellm_logging_obj.async_failure_handler(
|
||||
exception=original_exception,
|
||||
|
|
|
@ -76,7 +76,7 @@ class testLogger(CustomLogger):
|
|||
self.reaches_async_failure_event = True
|
||||
|
||||
def log_failure_event(self, kwargs, response_obj, start_time, end_time):
|
||||
self.reaches_failure_event = True
|
||||
self.reaches_sync_failure_event = True
|
||||
|
||||
|
||||
router = Router(
|
||||
|
@ -186,4 +186,5 @@ async def test_chat_completion_request_with_redaction(route, body):
|
|||
await asyncio.sleep(3)
|
||||
|
||||
assert _test_logger.reaches_async_failure_event is True
|
||||
|
||||
assert _test_logger.reaches_sync_failure_event is True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue