From f32d39aa93de32318635c15752bb076e4dcb11c0 Mon Sep 17 00:00:00 2001 From: CLARKBENHAM Date: Tue, 2 Apr 2024 14:49:20 -0700 Subject: [PATCH] check if in future None results are returned --- tests/test_ratelimit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_ratelimit.py b/tests/test_ratelimit.py index e13d7b8ab9..6e9b697c84 100644 --- a/tests/test_ratelimit.py +++ b/tests/test_ratelimit.py @@ -91,6 +91,10 @@ def test_rate_limit(router_factory, num_messages, num_rate_limits, sync_mode): results = sync_call(router, list_of_messages) else: results = asyncio.run(async_call(router, list_of_messages)) + if len([i for i in results if i is not None]) != num_messages: + raise ValueError( + "No deployments available for selected model" + ) # not all results got returned raise ExpectNoException if expected_exception is not ExpectNoException: