コード例 #1
0
def test_validate_supersedings():
    supersedes = [
        SectionName("foo"),
        SectionName("bar"),
        SectionName("foo"),
    ]

    with pytest.raises(ValueError, match="duplicate"):
        section_plugins._validate_supersedings(supersedes)
コード例 #2
0
ファイル: test_section_plugins.py プロジェクト: jsjhb/checkmk
def test_validate_supersedings_raise_self_superseding():
    with pytest.raises(ValueError, match="cannot supersede myself"):
        section_plugins._validate_supersedings(SectionName("foo"),
                                               [SectionName("foo")])