

def testGetValuesByAttrib(self):
    tplt = 'Value Required boo (on.)\nValue Required,List hoo (on.)\n\nStart\n  ^$boo -> Continue\n  ^$hoo -> Record'
    t = textfsm.TextFSM(cStringIO.StringIO(tplt))
    self.failUnlessEqual(t.GetValuesByAttrib('List'), ['hoo'])
    self.failUnlessEqual(t.GetValuesByAttrib('Filldown'), [])
    result = t.GetValuesByAttrib('Required')
    result.sort()
    self.assertEqual(result, ['boo', 'hoo'])

dataset/ETHPy150Open google/textfsm/textfsm_test.py UnitTestFSM.testGetValuesByAttrib/original