예제 #1
0
파일: test_yubico.py 프로젝트: ae-m/LinOTP
 def test_hexdump(self):
     """ Test hexdump function, with colors """
     bytes = '\x01\x02\x03\x04\x05\x06\x07\x08'
     self.assertEqual(yubico_util.hexdump(bytes, length=4, colorize=True), \
                          '0000   \x1b[0m01 02 03\x1b[0m 04\n0004   \x1b[0m05 06 07\x1b[0m 08\n')
예제 #2
0
 def test_hexdump2(self):
     """ Test hexdump function, with colors """
     bytes = b'\x01\x02\x03\x04\x05\x06\x07\x08'
     self.assertEqual(yubico_util.hexdump(bytes, length=4, colorize=True), \
                          '0000   \x1b[0m01 02 03\x1b[0m 04\n0004   \x1b[0m05 06 07\x1b[0m 08\n')
예제 #3
0
파일: test_yubico.py 프로젝트: ae-m/LinOTP
 def test_hexdump(self):
     """ Test hexdump function, normal use """
     bytes = '\x01\x02\x03\x04\x05\x06\x07\x08'
     self.assertEqual(yubico_util.hexdump(bytes, length=4), \
                          '0000   01 02 03 04\n0004   05 06 07 08\n')
예제 #4
0
 def test_hexdump(self):
     """ Test hexdump function, normal use """
     bytes = b'\x01\x02\x03\x04\x05\x06\x07\x08'
     self.assertEqual(yubico_util.hexdump(bytes, length=4), \
                          '0000   01 02 03 04\n0004   05 06 07 08\n')