Fix sequence test for MySQL

MySQLdb always return a long and hex append 'L' when converting long so long
must be converted into int before calling hex.
This commit is contained in:
Cédric Krier committed 2010-09-25 16:46:51 +02:00
1 parent 7314ffc54d
commit d1475e74f9
1 file changed
+2 -1
+2 -1
View File
@@ -86,7 +86,8 @@ class SequenceTestCase(unittest.TestCase):
})
timestamp = self.sequence.get_id(sequence_id)
sequence = self.sequence.read(sequence_id, ['last_timestamp'])
self.assertEqual(timestamp, hex(sequence['last_timestamp'])[2:].upper())
self.assertEqual(timestamp,
hex(int(sequence['last_timestamp']))[2:].upper())
self.assertNotEqual(self.sequence.get_id(sequence_id), timestamp)