예제 #1
0
    def test_b32decode_one_pad(self):
        expected = 'IFBEGRA='
        s = 'IFBEGRA'

        self.assertEqual(expected, codec_base64.fix_base32_padding(s))
예제 #2
0
    def test_b32decode_one_pad(self):
        expected = 'IFBEGRA='.encode('UTF-8')
        s = 'IFBEGRA'.encode('UTF-8')

        self.assertEqual(expected, codec_base64.fix_base32_padding(s))
예제 #3
0
    def test_b32decode_zero_pads(self):
        # don't fix properly padded base32
        expected = 'IFBEGRCFIY======'
        s = 'IFBEGRCFIY======'

        self.assertEqual(expected, codec_base64.fix_base32_padding(s))
예제 #4
0
    def test_b32decode_zero_pads(self):
        # don't fix properly padded base32
        expected = 'IFBEGRCFIY======'.encode('UTF-8')
        s = 'IFBEGRCFIY======'.encode('UTF-8')

        self.assertEqual(expected, codec_base64.fix_base32_padding(s))