From b8d51ee3abf31f7405afff77f91940ec4fa1924c Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 14 Dec 2023 19:46:56 +0530 Subject: [PATCH] (test) router - acompletion + cache --- litellm/tests/test_router.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/tests/test_router.py b/litellm/tests/test_router.py index 7e859094ad..ef7474b926 100644 --- a/litellm/tests/test_router.py +++ b/litellm/tests/test_router.py @@ -413,6 +413,9 @@ def test_acompletion_on_router(): print("Testing acompletion + caching on router") response1 = await router.acompletion(model="gpt-3.5-turbo", messages=messages, temperature=1) print(f"response1: {response1}") + + await asyncio.sleep(1) # add cache is async, async sleep for cache to get set + response2 = await router.acompletion(model="gpt-3.5-turbo", messages=messages, temperature=1) print(f"response2: {response2}") assert response1.id == response2.id