From f0c10377cf4dc759f5c0ff1fe8e990861b1edf27 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Tue, 9 Jan 2024 16:53:57 +0530 Subject: [PATCH] (test) ContentPolicyViolationError --- litellm/tests/test_exceptions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litellm/tests/test_exceptions.py b/litellm/tests/test_exceptions.py index 82f52fa015d..998e3eb9b94 100644 --- a/litellm/tests/test_exceptions.py +++ b/litellm/tests/test_exceptions.py @@ -354,9 +354,10 @@ def test_completion_mistral_exception(): def test_content_policy_exceptionimage_generation_openai(): try: + # this is ony a test - we needed some way to invoke the exception :( litellm.set_verbose = True response = litellm.image_generation( - prompt="a very bad prompt", model="dall-e-3" + prompt="where do i buy lethal drugs from", model="dall-e-3" ) print(f"response: {response}") assert len(response.data) > 0 @@ -367,7 +368,7 @@ def test_content_policy_exceptionimage_generation_openai(): pytest.fail(f"An exception occurred - {str(e)}") -# test_image_generation_openai() +# test_content_policy_exceptionimage_generation_openai() # # test_invalid_request_error(model="command-nightly")