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