Ejemplo n.º 1
0
def test_set_remote_source_setting_for_custom_by_project_id():
    project_name = "JVL-source-pulling"
    projects_api = ProjectsAPI()
    project_id = projects_api.create_project_if_not_exists_by_project_name_and_team_full_name(
        project_name)
    # path = "\\\\Localhost\\c$\\\\Users\\HappyY\\Downloads\\SourceCode\\MyLocal\\Cx\\Repo"
    path = r"\\WIN-4MUJCQQ4KNT\Users\Administrator\Downloads\CxShare\sample"
    # Path should not be local
    custom_task_name = "git"
    custom_tasks_api = CustomTasksAPI()
    pre_scan_command_id = custom_tasks_api.get_custom_task_id_by_name(
        custom_task_name)

    username = r"\\WIN-4MUJCQQ4KNT\Administrator"
    password = "******"
    result = projects_api.set_remote_source_setting_for_custom_by_project_id(
        project_id, path, pre_scan_command_id, username, password)
    assert result is True
def test_get_custom_task_by_id():
    custom_task_name = "git"
    custom_tasks_api = CustomTasksAPI()
    task_id = custom_tasks_api.get_custom_task_id_by_name(custom_task_name)
    custom_task = custom_tasks_api.get_custom_task_by_id(task_id)
    assert custom_task is not None
def test_get_custom_task_id_by_name():
    custom_task_name = "git"
    custom_tasks_api = CustomTasksAPI()
    task_id = custom_tasks_api.get_custom_task_id_by_name(custom_task_name)
    assert task_id is not None
def test_get_all_custom_tasks():
    custom_tasks_api = CustomTasksAPI()
    custom_tasks = custom_tasks_api.get_all_custom_tasks()
    assert custom_tasks is not None