blob: 2a179a88a6ccc18e60d7c4f18f12db52568d0905 [file] [log] [blame]
Yesudeep Mangalapilly5bfe5ff2011-08-16 14:58:32 +05301#!/usr/bin/env python
2# -*- coding: utf-8 -*-
3
4import unittest2
5from rsa._compat import b
6
7from rsa._version200 import int2bytes, bytes2int
8
9class 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)