From d1475e74f907aa4e693ee6bcbf69181b9adcac3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sat, 25 Sep 2010 16:46:51 +0200 Subject: [PATCH] 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. --- trytond/tests/test_sequence.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/tests/test_sequence.py b/trytond/tests/test_sequence.py index 834a74f5ee..8a07b671fc 100644 --- a/trytond/tests/test_sequence.py +++ b/trytond/tests/test_sequence.py @@ -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)