コード例 #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
ファイル: test_yubico.py プロジェクト: subdavis/python-yubico
 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
ファイル: test_yubico.py プロジェクト: subdavis/python-yubico
 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')