HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/twisted/test/__pycache__/test_roots.cpython-310.pyc
o

�bk�@s.ddlmZddlmZGdd�dej�ZdS)�)�roots)�unittestc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�
RootsTestscCs`t��}z|�d�Wn	tyYnw|��z|��Wn
ty)YdSw|��dS)Nsblah)r�Request�write�NotImplementedError�fail�finish)�self�request�r�9/usr/lib/python3/dist-packages/twisted/test/test_roots.py�testExceptions
s��zRootsTests.testExceptionscCs�t��}|�dd�|�|�d�d�|�d�|�|�d�d�z|�dd�Wn	ty2Ynw|��z|�	dd�Wn
tyIYdSw|��dS)N�x�test)
r�
Collection�	putEntity�assertEqual�getStaticEntity�	delEntity�storeEntityrr�removeEntity)r
�
collectionrrr
�testCollections"
��zRootsTests.testCollectioncCsBGdd�dtj�}|�}|�|�dd��|�tj|jdd�dS)Nc@seZdZdd�ZdS)z)RootsTests.testConstrained.<locals>.constcSs|dkS)Nrr)r
�namerrr
�nameConstraint.sz8RootsTests.testConstrained.<locals>.const.nameConstraintN)�__name__�
__module__�__qualname__rrrrr
�const-srrr�y)r�Constrained�assertIsNoner�assertRaises�ConstraintViolation)r
r�crrr
�testConstrained,szRootsTests.testConstrainedcCsDt��}t|_|�dd�|�|�d�d�|�tj|jdd�dS)N�a�rr )	r�
Homogenous�int�
entityTyperrrr#r$)r
�hrrr
�testHomogenous5s
zRootsTests.testHomogenousN)rrrrrr&r-rrrr
r	s
	rN)�twisted.pythonr�
twisted.trialr�TestCaserrrrr
�<module>s