def testNicSort(self): nics = { 'nics_init': ( 'p33p1', 'eth1', 'lan0', 'em0', 'p331', 'Lan1', 'eth0', 'em1', 'p33p2', 'p33p10', ), 'nics_expected': ( 'Lan1', 'em0', 'em1', 'eth0', 'eth1', 'lan0', 'p33p1', 'p33p10', 'p33p2', 'p331', ), } nics_res = _nicSort(nics['nics_init']) self.assertEqual(nics['nics_expected'], tuple(nics_res))
def testNicSort(self): nics = {'nics_init': ('p33p1', 'eth1', 'lan0', 'em0', 'p331', 'Lan1', 'eth0', 'em1', 'p33p2', 'p33p10'), 'nics_expected': ('Lan1', 'em0', 'em1', 'eth0', 'eth1', 'lan0', 'p33p1', 'p33p10', 'p33p2', 'p331')} nics_res = _nicSort(nics['nics_init']) self.assertEqual(nics['nics_expected'], tuple(nics_res))