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)
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)
def test_not_error_entry(): execute_command_results = "invalid command results as string" assert not is_error(execute_command_results)
def test_is_error_none(): assert not is_error(None)