Esempio n. 1
0
 def test_others_in_orders(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 5, 6]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Esempio n. 2
0
 def test_order_keys_with_multidot(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 4, '.', 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Esempio n. 3
0
 def test_simple_order_keys(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, 4, 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 4, 5, 1, 2])
Esempio n. 4
0
 def test_others_in_orders(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 5, 6]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Esempio n. 5
0
 def test_order_keys_with_multidot(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, '.', 4, '.', 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 1, 2, 4, 5])
Esempio n. 6
0
 def test_simple_order_keys(self):
     keys = [1, 2, 3, 4, 5]
     orders = [3, 4, 5]
     ordered_keys = util.orderKeys(keys, orders)
     self.assertEqual(ordered_keys, [3, 4, 5, 1, 2])