@@ -263,6 +263,88 @@ async def test_queue_includes_user_agent_header() -> None:
263263 assert headers ["User-Agent" ].startswith ("decart-python-sdk/" )
264264
265265
266+ # Tests for lucy-2-v2v
267+
268+
269+ @pytest .mark .asyncio
270+ async def test_queue_lucy2_v2v_with_prompt () -> None :
271+ client = DecartClient (api_key = "test-key" )
272+
273+ with patch ("decart.queue.client.submit_job" ) as mock_submit :
274+ mock_submit .return_value = MagicMock (job_id = "job-lucy2" , status = "pending" )
275+
276+ job = await client .queue .submit (
277+ {
278+ "model" : models .video ("lucy-2-v2v" ),
279+ "prompt" : "Transform the scene" ,
280+ "data" : b"fake video data" ,
281+ "enhance_prompt" : True ,
282+ "seed" : 42 ,
283+ }
284+ )
285+
286+ assert job .job_id == "job-lucy2"
287+ assert job .status == "pending"
288+ mock_submit .assert_called_once ()
289+
290+
291+ @pytest .mark .asyncio
292+ async def test_queue_lucy2_v2v_with_reference_image_only () -> None :
293+ client = DecartClient (api_key = "test-key" )
294+
295+ with patch ("decart.queue.client.submit_job" ) as mock_submit :
296+ mock_submit .return_value = MagicMock (job_id = "job-lucy2-ref" , status = "pending" )
297+
298+ job = await client .queue .submit (
299+ {
300+ "model" : models .video ("lucy-2-v2v" ),
301+ "reference_image" : b"fake image data" ,
302+ "data" : b"fake video data" ,
303+ }
304+ )
305+
306+ assert job .job_id == "job-lucy2-ref"
307+ assert job .status == "pending"
308+ mock_submit .assert_called_once ()
309+
310+
311+ @pytest .mark .asyncio
312+ async def test_queue_lucy2_v2v_with_both_prompt_and_reference_image () -> None :
313+ client = DecartClient (api_key = "test-key" )
314+
315+ with patch ("decart.queue.client.submit_job" ) as mock_submit :
316+ mock_submit .return_value = MagicMock (job_id = "job-lucy2-both" , status = "pending" )
317+
318+ job = await client .queue .submit (
319+ {
320+ "model" : models .video ("lucy-2-v2v" ),
321+ "prompt" : "Transform the scene" ,
322+ "reference_image" : b"fake image data" ,
323+ "data" : b"fake video data" ,
324+ "seed" : 123 ,
325+ }
326+ )
327+
328+ assert job .job_id == "job-lucy2-both"
329+ assert job .status == "pending"
330+ mock_submit .assert_called_once ()
331+
332+
333+ @pytest .mark .asyncio
334+ async def test_queue_lucy2_v2v_rejects_neither_prompt_nor_reference_image () -> None :
335+ client = DecartClient (api_key = "test-key" )
336+
337+ with pytest .raises (DecartSDKError ) as exc_info :
338+ await client .queue .submit (
339+ {
340+ "model" : models .video ("lucy-2-v2v" ),
341+ "data" : b"fake video data" ,
342+ }
343+ )
344+
345+ assert "at least one of 'prompt' or 'reference_image'" in str (exc_info .value ).lower ()
346+
347+
266348# Tests for lucy-restyle-v2v with reference_image
267349
268350
0 commit comments