def test_add_tags(self): hier = HConfig(host=self.host_a) tag_rules = [{"lineage": [{"equals": "interface Vlan2"}], "add_tags": "test"}] child = hier.add_child("interface Vlan2") hier.add_tags(tag_rules) assert {"test"} == child.tags
def test_add_tags(self): hier = HConfig(host=self.host_a) tag_rules = [{ 'lineage': [{ 'equals': 'interface Vlan2' }], 'add_tags': 'test' }] child = hier.add_child('interface Vlan2') hier.add_tags(tag_rules) self.assertEqual({'test'}, child.tags)