def setUp(self): listString = [ '/tmp/SACN43:ncp1:CWAO:SA:3.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:1.A.I.E::2012', '/tmp/SACN41:ncp1:CWAO:SA:2.A.I.E::2012' ] self.multiKeysStringSorter = MultiKeysStringSorter(listString)
class unittest_MultiKeysStringSorter(unittest.TestCase): def setUp(self): listString = ['/tmp/SACN43:ncp1:CWAO:SA:3.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:1.A.I.E::2012', '/tmp/SACN41:ncp1:CWAO:SA:2.A.I.E::2012'] self.multiKeysStringSorter = MultiKeysStringSorter(listString) def test_MultiKeysStringSorter(self): self.assertEqual(self.multiKeysStringSorter.sort(), ['/tmp/SACN42:ncp1:CWAO:SA:1.A.I.E::2012', '/tmp/SACN41:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN43:ncp1:CWAO:SA:3.A.I.E::2012'])
class unittest_MultiKeysStringSorter(unittest.TestCase): def setUp(self): listString = [ '/tmp/SACN43:ncp1:CWAO:SA:3.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:1.A.I.E::2012', '/tmp/SACN41:ncp1:CWAO:SA:2.A.I.E::2012' ] self.multiKeysStringSorter = MultiKeysStringSorter(listString) def test_MultiKeysStringSorter(self): self.assertEqual(self.multiKeysStringSorter.sort(), [ '/tmp/SACN42:ncp1:CWAO:SA:1.A.I.E::2012', '/tmp/SACN41:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN43:ncp1:CWAO:SA:3.A.I.E::2012' ])
def setUp(self): listString = ['/tmp/SACN43:ncp1:CWAO:SA:3.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:2.A.I.E::2012', '/tmp/SACN42:ncp1:CWAO:SA:1.A.I.E::2012', '/tmp/SACN41:ncp1:CWAO:SA:2.A.I.E::2012'] self.multiKeysStringSorter = MultiKeysStringSorter(listString)