async def METHOD_NAME(mock_execute, jp_fetch, jp_root_dir):
    # Given
    local_path = jp_root_dir / "test_path"
    url = "http://github.com/myid/myrepository.git"
    name = "distant"
    mock_execute.return_value = maybe_future((0, "", ""))
    # When
    body = {"url": url, "name": name}
    response = await jp_fetch(
        NAMESPACE,
        local_path.name,
        "remote",
        "add",
        body=json.dumps(body),
        method="POST",
    )
    # Then
    command = ["git", "remote", "add", name, url]
    mock_execute.assert_called_once_with(
        command,
        cwd=str(local_path),
        timeout=20,
        env=None,
        username=None,
        password=None,
        is_binary=False,
    )
    assert response.code == 201
    payload = json.loads(response.body)
    assert payload == {
        "code": 0,
        "command": " ".join(command),
    }