Esempio n. 1
0
def test_get_largest_inputs_and_outputs__on_fail():
    """
    Given:
        a failure message from getInvPlaybookMetaData command
    When:
        Running get_largest_inputs_and_outputs.
    Then:
        the result is an empty list
    """
    from GetLargestInputsAndOuputsInIncidents import get_largest_inputs_and_outputs
    res = []
    get_largest_inputs_and_outputs('No data', res, '1')
    assert len(res) == 0
Esempio n. 2
0
def test_get_largest_inputs_and_outputs():
    """
    Given:
        a list of inputs and outputs
    When:
        Running get_largest_inputs_and_outputs.
    Then:
        the result a list with only the larges input and output
    """
    from GetLargestInputsAndOuputsInIncidents import get_largest_inputs_and_outputs
    res = []
    get_largest_inputs_and_outputs(inputs_and_outputs, res, '1')
    assert len(res) == 2
    assert largest_input in res
    assert largest_output in res