Ejemplo n.º 1
0
def test_is_error_true():
    execute_command_results = [{
        "Type": entryTypes["error"],
        "ContentsFormat": formats["text"],
        "Contents": "this is error message"
    }]
    assert is_error(execute_command_results)
Ejemplo n.º 2
0
def test_is_error_false():
    execute_command_results = [{
        "Type": entryTypes["note"],
        "ContentsFormat": formats["text"],
        "Contents": "this is regular note"
    }]
    assert not is_error(execute_command_results)
Ejemplo n.º 3
0
def test_not_error_entry():
    execute_command_results = "invalid command results as string"
    assert not is_error(execute_command_results)
Ejemplo n.º 4
0
def test_is_error_none():
    assert not is_error(None)