MCPcopy Create free account
hub / github.com/bigdra50/unity-cli / test_invoke_sends_custom_params

Method test_invoke_sends_custom_params

tests/test_dynamic_api.py:68–72  ·  view source on GitHub ↗
(self, sut: DynamicAPI, mock_conn: MagicMock)

Source from the content-addressed store, hash-verified

66 assert params["params"] == []
67
68 def test_invoke_sends_custom_params(self, sut: DynamicAPI, mock_conn: MagicMock) -> None:
69 mock_conn.send_request.return_value = {}
70 sut.invoke("UnityEditor.AssetDatabase", "ImportAsset", ["Assets/test.prefab", 0])
71 params = mock_conn.send_request.call_args[0][1]
72 assert params["params"] == ["Assets/test.prefab", 0]
73
74 def test_invoke_returns_response(self, sut: DynamicAPI, mock_conn: MagicMock) -> None:
75 expected = {

Callers

nothing calls this directly

Calls 1

invokeMethod · 0.80

Tested by

no test coverage detected