MCPcopy Create free account
hub / github.com/VAST-AI-Research/tripo-python-sdk / test_texture_model

Method test_texture_model

tests/test_client.py:593–623  ·  view source on GitHub ↗

Test creating a texture model task.

(self, client)

Source from the content-addressed store, hash-verified

591
592 @pytest.mark.asyncio
593 async def test_texture_model(self, client):
594 """Test creating a texture model task."""
595 with patch.object(client, 'upload_file', return_value="image-token-123"), \
596 patch.object(client, 'create_task', return_value="task-123"), \
597 patch('os.path.isfile', return_value=True):
598 task_id = await client.texture_model(
599 model_url="https://example.com/model.glb",
600 texture_prompt="shiny metal surface",
601 texture_image_path="texture.jpg",
602 pbr=True,
603 texture_seed=789,
604 texture_quality="standard",
605 texture_alignment="original_image"
606 )
607
608 assert task_id == "task-123"
609
610 expected_data = {
611 "type": "texture_model",
612 "model_url": "https://example.com/model.glb",
613 "texture_prompt": "shiny metal surface",
614 "texture_image": {
615 "type": "image",
616 "file_token": "image-token-123"
617 },
618 "pbr": True,
619 "texture_seed": 789,
620 "texture_quality": "standard",
621 "texture_alignment": "original_image"
622 }
623 client.create_task.assert_called_once_with(expected_data)
624
625 @pytest.mark.asyncio
626 async def test_refine(self, client):

Callers

nothing calls this directly

Calls 1

texture_modelMethod · 0.80

Tested by

no test coverage detected