????

Your IP : 18.116.47.2


Current Path : /usr/lib/python3.6/site-packages/josepy/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/josepy/__pycache__/b64_test.cpython-36.pyc

3

�}:a��@sldZddlZdddddd�Zed�ded�ddiZGdd�dej�ZGdd�dej�Zedkrhej	�dS)zTests for josepy.b64.�N�YW55IGNhcm5hbCBwbGVhc3VyZS4�=�YW55IGNhcm5hbCBwbGVhc3VyZQ�==�YW55IGNhcm5hbCBwbGVhc3Vy��YW55IGNhcm5hbCBwbGVhc3U�YW55IGNhcm5hbCBwbGVhcw)sany carnal pleasure.sany carnal pleasuresany carnal pleasursany carnal pleasusany carnal pleas���s--8��s__8c@s<eZdZdZedd��Zdd�Zdd�Zdd	�Zd
d�Z	dS)
�
B64EncodeTestzTests for josepy.b64.b64encode.cCsddlm}||�S)Nr)�	b64encode)�
josepy.b64r)�cls�datar�r�/usr/lib/python3.6/b64_test.py�_callszB64EncodeTest._callcCs|j|jd�d�dS)Nr)�assertEqualr)�selfrrr�
test_emptyszB64EncodeTest.test_emptycCs,x&tj�D]\}}|j|j|�|�q
WdS)N)�B64_URL_UNSAFE_EXAMPLES�itemsrr)r�text�b64rrr�test_unsafe_url szB64EncodeTest.test_unsafe_urlcCs0x*tj�D]\}\}}|j|j|�|�q
WdS)N)�B64_PADDING_EXAMPLESrrr)rrr�_rrr�test_different_paddings$sz%B64EncodeTest.test_different_paddingscCs|jt|jd�dS)Nzsome unicode)�assertRaises�	TypeErrorr)rrrr�"test_unicode_fails_with_type_error(sz0B64EncodeTest.test_unicode_fails_with_type_errorN)
�__name__�
__module__�__qualname__�__doc__�classmethodrrrr r#rrrrrsrc@sLeZdZdZedd��Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�ZdS)�
B64DecodeTestzTests for josepy.b64.b64decode.cCsddlm}||�S)Nr)�	b64decode)rr*)rrr*rrrr/szB64DecodeTest._callcCs,x&tj�D]\}}|j|j|�|�q
WdS)N)rrrr)rrrrrrr4szB64DecodeTest.test_unsafe_urlcCs0x*tj�D]\}\}}|j|j|�|�q
WdS)N)rrrr)rrrrrrr�test_input_without_padding8sz(B64DecodeTest.test_input_without_paddingcCs4x.tj�D]"\}\}}|j|j||�|�q
WdS)N)rrrr)rrrZpadrrr�test_input_with_padding<sz%B64DecodeTest.test_input_with_paddingcCs|j|jd�d�dS)NZYQ�a)rr)rrrr�test_unicode_with_ascii@sz%B64DecodeTest.test_unicode_with_asciicCs|jt|jd�dS)Nuą)r!�
ValueErrorr)rrrr�test_non_ascii_unicode_failsCsz*B64DecodeTest.test_non_ascii_unicode_failscCs|jt|jt��dS)N)r!r"r�object)rrrr�#test_type_error_no_unicode_or_bytesFsz1B64DecodeTest.test_type_error_no_unicode_or_bytesN)r$r%r&r'r(rrr+r,r.r0r2rrrrr),sr)�__main__)rr)rr)rr)rr)r	r)r
r)r)
r'Zunittestr�bytesrZTestCaserr)r$�mainrrrr�<module>s