diff --git a/litellm/tests/test_image_generation.py b/litellm/tests/test_image_generation.py index d177ec81d..06441e3f4 100644 --- a/litellm/tests/test_image_generation.py +++ b/litellm/tests/test_image_generation.py @@ -8,7 +8,7 @@ import logging logging.basicConfig(level=logging.DEBUG) load_dotenv() import os - +import asyncio sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path @@ -35,12 +35,15 @@ def test_image_generation_azure_dall_e_3(): print(f"response: {response}") assert len(response.data) > 0 # test_image_generation_azure_dall_e_3() -# @pytest.mark.asyncio -# async def test_async_image_generation_openai(): -# response = litellm.image_generation(prompt="A cute baby sea otter", model="dall-e-3") -# print(f"response: {response}") +@pytest.mark.asyncio +async def test_async_image_generation_openai(): + response = litellm.image_generation(prompt="A cute baby sea otter", model="dall-e-3") + print(f"response: {response}") + assert len(response.data) > 0 -# @pytest.mark.asyncio -# async def test_async_image_generation_azure(): -# response = litellm.image_generation(prompt="A cute baby sea otter", model="azure/dall-e-3") -# print(f"response: {response}") \ No newline at end of file +# asyncio.run(test_async_image_generation_openai()) + +@pytest.mark.asyncio +async def test_async_image_generation_azure(): + response = await litellm.aimage_generation(prompt="A cute baby sea otter", model="azure/dall-e-3-test") + print(f"response: {response}") \ No newline at end of file