Esempio n. 1
0
 def test_invalid_padding(self):
     """
     If the given string has incorrect padding, the function should add the
     needed padding and decode properly.
     """
     eq_(modified_url_b64decode('abc'), base64.b64decode('abc='))
     eq_(modified_url_b64decode('ab'), base64.b64decode('ab=='))
Esempio n. 2
0
 def test_invalid_padding(self):
     """
     If the given string has incorrect padding, the function should add the
     needed padding and decode properly.
     """
     eq_(modified_url_b64decode('abc'), base64.b64decode('abc='))
     eq_(modified_url_b64decode('ab'), base64.b64decode('ab=='))
Esempio n. 3
0
 def test_basic_decode(self):
     """Test that basic decoding functionality works."""
     eq_(modified_url_b64decode('UA=='), 'P')
Esempio n. 4
0
 def test_character_replacement(self):
     """
     The modified decoding should replace the - and _ characters with + and
     / before decoding.
     """
     eq_(modified_url_b64decode('a-b_'), base64.b64decode('a+b/'))
Esempio n. 5
0
 def test_basic_decode(self):
     """Test that basic decoding functionality works."""
     eq_(modified_url_b64decode('UA=='), 'P')
Esempio n. 6
0
 def test_character_replacement(self):
     """
     The modified decoding should replace the - and _ characters with + and
     / before decoding.
     """
     eq_(modified_url_b64decode('a-b_'), base64.b64decode('a+b/'))