How to use the locustio.jira.requests_params.ViewBoard function in locustio

To help you get started, we’ve selected a few locustio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github atlassian / dc-app-performance-toolkit / app / locustio / jira / http_actions.py View on Github external
def view_board(locust, board_id, view_backlog=False):
    params = ViewBoard()
    if view_backlog:
        url = f'/secure/RapidBoard.jspa?rapidView={board_id}&view=planning'
    else:
        url = f'/secure/RapidBoard.jspa?rapidView={board_id}'

    r = locust.client.get(url, catch_response=True)
    content = r.content.decode('utf-8')
    project_key = fetch_by_re(params.project_key_pattern, content)
    project_id = fetch_by_re(params.project_id_pattern, content)
    project_plan = fetch_by_re(params.project_plan_pattern, content, group_no=2)
    if project_plan:
        project_plan = project_plan.replace('\\', '')
    logger.locust_info(f"{params.action_name}: key = {project_key}, id = {project_id}, plan = {project_plan}")
    assert f'currentViewConfig\"{{\"id\":{board_id}', 'Could not open board'

    locust.client.post('/rest/webResources/1.0/resources', params.resources_body.get("1000"),