Yesudeep Mangalapilly | 5bfe5ff | 2011-08-16 14:58:32 +0530 | [diff] [blame^] | 1 | #!/usr/bin/env python |
2 | # -*- coding: utf-8 -*- | ||||
3 | |||||
4 | import unittest2 | ||||
5 | from rsa._compat import b | ||||
6 | |||||
7 | from rsa._version200 import int2bytes, bytes2int | ||||
8 | |||||
9 | class Test_int2bytes(unittest2.TestCase): | ||||
10 | def test_values(self): | ||||
11 | self.assertEqual(int2bytes(123456789), b('\x07[\xcd\x15')) | ||||
12 | self.assertEqual(bytes2int(int2bytes(123456789)), 123456789) |