| 90 | |
| 91 | @pytest.mark.asyncio |
| 92 | async def test_generate_image_local(self): |
| 93 | res = await execute(self.request_data) |
| 94 | assert res.status_code == 200, res.json() |
| 95 | assert res.json()["status"] == "success" |
| 96 | res_data = res.json()["data"] |
| 97 | assert res_data["status"] == 200 |
| 98 | url = res_data["data"]["url"] |
| 99 | assert url is not None |
| 100 | assert url.startswith(self.HOST_URL) |
| 101 | |
| 102 | self.openai_data["input_params"]["image_url"] = url |
| 103 | openai_res = await execute(self.openai_data) |
| 104 | assert openai_res.status_code == 200, openai_res.json() |
| 105 | |
| 106 | self.gemini_data["input_params"]["image_url"] = url |
| 107 | gemini_res = await execute(self.gemini_data) |
| 108 | assert gemini_res.status_code == 200, gemini_res.json() |