def test_discovered_host_labels_to_list(): labels = DiscoveredHostLabels() assert labels.to_list() == [] labels.add_label(HostLabel(u"äbc", u"123", "plugin_1")) labels.add_label(HostLabel(u"xyz", u"blä", "plugin_2")) assert labels.to_list() == [ HostLabel(u"xyz", u"blä", "plugin_2"), HostLabel(u"äbc", u"123", "plugin_1") ]
def test_discovered_host_labels_to_list(): labels = DiscoveredHostLabels() assert labels.to_list() == [] labels.add_label(HostLabel("äbc", "123", SectionName("plugin_1"))) labels.add_label(HostLabel("xyz", "blä", SectionName("plugin_2"))) assert labels.to_list() == [ HostLabel("xyz", "blä", SectionName("plugin_2")), HostLabel("äbc", "123", SectionName("plugin_1")), ]