Exemplo n.º 1
0
def test_transition_previously_created_new_feature_issue_to_other_states_with_a_resolution_for_appropriate_states(
):
    """
        transition a newly created issue through many states
    """
    jp = JiraProxy(VANILLA_SERVER_REGULAR_USER_CONFIG)
    status_items = jp.getStatuses(VANILLA_SERVER_REGULAR_USER_CONFIG)
    #print("\nStatus values for the NFI project")
    #for status in status_items:
    #    print(f'...   {status}')

    nf_item = jp.getIssue(STATIC_NEW_FEATURE_ITEM)
    #print(f"Current state: {nf_item.Status}     Resolution: |{nf_item.Resolution}|")
    transitions = jp.getTransitions(nf_item.key)
    #for next_state, trans_info in transitions.items():
    #    print(next_state, trans_info)

    #print(f"\n {nf_item.key} Status Transitions:")
    for new_state in expected_results:
        #print(f'Updating current status {nf_item.Status} to {new_state}')
        if nf_item.Status == new_state:
            #print(f'... skipping status update, new_status same as current status {nf_item.Status}')
            continue
        nf_item = jp.transitionIssueState(nf_item.key,
                                          new_state,
                                          resolution=None)
        #print(f'...   transitioned Issue.Status is now {nf_item.Status}')
        assert nf_item.Status == new_state
Exemplo n.º 2
0
def test_get_status_info():
    """
        will return status values and id's
    """
    jp = JiraProxy(GOOD_VANILLA_SERVER_CONFIG)

    status_values = jp.getStatuses(GOOD_VANILLA_SERVER_CONFIG)
    # In JIRA 7.x, the default workflow Story status list is:
    #   ['In Progress', 'To Do', 'In Review', 'Done']
    #   with no proscribed state change restrictions

    assert "To Do" in status_values
    assert "In Progress" in status_values

    ## TODO Should we really be testing the it values for status_values ?
    assert jp.status_value_for_id["10000"] == "To Do"
    assert jp.status_value_for_id["3"] == "In Progress"
    inverted_status_value_for_id \
            = {value:key for key,value in jp.status_value_for_id.items()}
    assert inverted_status_value_for_id["In Progress"] == "3"