Example #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=='))
Example #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=='))
Example #3
0
 def test_basic_decode(self):
     """Test that basic decoding functionality works."""
     eq_(modified_url_b64decode('UA=='), 'P')
Example #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/'))
Example #5
0
 def test_basic_decode(self):
     """Test that basic decoding functionality works."""
     eq_(modified_url_b64decode('UA=='), 'P')
Example #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/'))