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