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