Пример #1
0
def test_unique_wato_menu_item_titels():
    titles = [
        entry.title
        for topic_menu_topic in get_wato_menu_items()
        for entry in topic_menu_topic.items
    ]
    assert len(titles) == len(set(titles))
Пример #2
0
def test_get_wato_menu_items():
    items_by_topic: Dict[str, List[str]] = {}
    for topic in get_wato_menu_items():
        items = items_by_topic.setdefault(topic.name, [])
        for item in topic.items:
            items.append(item.name)

    assert expected_items() == items_by_topic
Пример #3
0
def _setup_menu_topics() -> List[TopicMenuTopic]:
    from cmk.gui.plugins.sidebar.wato import get_wato_menu_items
    return get_wato_menu_items()