Exemplo n.º 1
0
def test_parse_action_replace_is_default(mocker):
    m = mocker.Mock(attributes={})
    assert parse_action(m) == replace
Exemplo n.º 2
0
def test_parse_action_edit_append(mocker):
    m = mocker.Mock(attributes={"edit": "append"})
    assert parse_action(m) == edit_append
Exemplo n.º 3
0
def test_parse_action_invalid_edit(mocker):
    m = mocker.Mock(attributes={"edit": "replace"})
    with pytest.raises(TerminalXMLParseError):
        parse_action(m)
Exemplo n.º 4
0
def test_parse_action_invalid(mocker):
    m = mocker.Mock(attributes={"action": "add"})
    with pytest.raises(TerminalXMLParseError):
        parse_action(m)
Exemplo n.º 5
0
def test_parse_action_merge(mocker):
    m = mocker.Mock(attributes={"action": "merge"})
    assert parse_action(m) == merge
Exemplo n.º 6
0
def test_parse_action_delete(mocker):
    m = mocker.Mock(attributes={"action": "delete"})
    assert parse_action(m) == delete
Exemplo n.º 7
0
def test_parse_action_append(mocker):
    m = mocker.Mock(attributes={"action": "append"})
    assert parse_action(m) == append
Exemplo n.º 8
0
def test_parse_action_replace(mocker):
    m = mocker.Mock(attributes={"action": "replace"})
    assert parse_action(m) == replace