Esempio n. 1
0
 def test_sortKey(self):
     tm = TM()
     # the default Transaction Manager should have .sortKey() of 1 for
     # backward compatibility
     self.assertEquals(tm.sortKey(), 1)
     # but the sortKey() should be adjustable
     tm.setSortKey(())
     self.assertEquals(tm.sortKey(), ())
Esempio n. 2
0
    def test_sortKey(self):
        tm = TM()
        # the default Transaction Manager should have .sortKey() of '1' for
        # backward compatibility. It must be a string according to the
        # ITransactionManager interface.
        self.assertEqual(tm.sortKey(), '1')

        # but the sortKey() should be adjustable
        tm.setSortKey('2')
        self.assertEqual(tm.sortKey(), '2')

        tm.setSortKey([])
        self.assertEqual(tm.sortKey(), '[]')