MCPcopy Create free account
hub / github.com/AutoPackAI/autopack / test_fetch_local_exists

Function test_fetch_local_exists

tests/test_get_pack_data.py:88–105  ·  view source on GitHub ↗
(mock_requests_get, valid_pack_data)

Source from the content-addressed store, hash-verified

86
87@pytest.mark.skip
88def test_fetch_local_exists(mock_requests_get, valid_pack_data):
89 pack_id = "I need to create a pack remotely and then use that"
90 # First install the pack
91 mock_response = Mock()
92 mock_response.status_code = 200
93 mock_response.json.return_value = valid_pack_data
94 mock_requests_get.return_value = mock_response
95
96 install_pack(pack_id)
97
98 api_url = PackConfig.global_config().api_url
99 mock_requests_get.assert_called_once_with(f"{api_url}api/details", params={"id": pack_id})
100
101 response = get_pack_details(pack_id)
102
103 assert response.repo_url == valid_pack_data["repo_url"]
104 assert response.package_path == valid_pack_data["package_path"]
105 assert response.class_name == valid_pack_data["class_name"]

Callers

nothing calls this directly

Calls 3

install_packFunction · 0.90
get_pack_detailsFunction · 0.90
global_configMethod · 0.80

Tested by

no test coverage detected