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 :  /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 : /lib/python3/dist-packages/twisted/test/__pycache__/test_ftp_options.cpython-310.pyc
o

�b�
�@sXdZddlmZmZddlmZddlmZddlm	Z	ddl
mZGdd�de�Zd	S)
z
Tests for L{twisted.tap.ftp}.
�)�credentials�error)�versions)�FilePath)�Options)�TestCasec@s<eZdZdZdZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
S)�FTPOptionsTestszJ
    Tests for the command line option parser used for C{twistd ftp}.
    )siamusersthisispasswordcCs2|��|_t|j�}|�d�|j��t�|_dS)z/
        Create a file with two users.
        �:N)�mktemp�filenamer�
setContent�join�usernamePasswordr�options)�self�f�r�?/usr/lib/python3/dist-packages/twisted/test/test_ftp_options.py�setUps

zFTPOptionsTests.setUpcCs$|�t�dddd�|jj|j�dS)zs
        The C{--password-file} option will emit a warning stating that
        said option is deprecated.
        �Twisted��rN)�callDeprecatedr�Versionr�opt_password_filer�rrrr�test_passwordfileDeprecations
�z,FTPOptionsTests.test_passwordfileDeprecationcCsBt|jd�}|j�dd|jg�|�t|jd�|d�dS)zf
        The C{--auth} command-line option will add a checker to the list of
        checkers
        �credCheckers�--auth�file:rN)�lenr�parseOptionsr�assertEqual)r�numCheckersrrr�test_authAdded*szFTPOptionsTests.test_authAddedcsT�j�dd�jg��jdd}t��jdd�}|�|���fdd�d	d��S)
z�
        The checker created by the C{--auth} command-line option returns a
        L{Deferred} that fails with L{UnauthorizedLogin} when
        presented with credentials that are unknown to that checker.
        rrr���r�fakecs
��d�S)Nz!Wrong password should raise error)�fail)�ignorerrr�<lambda>=s
z2FTPOptionsTests.test_authFailure.<locals>.<lambda>cSs|�tj�S�N)�trapr�UnauthorizedLogin)�errrrrr)>s)rr!rr�UsernamePasswordr�requestAvatarId�addCallbacks)r�checker�invalidrrr�test_authFailure3s

�z FTPOptionsTests.test_authFailurecsJ�j�dd�jg��jdd}tj�j��|������fdd��S)z�
        The checker created by the C{--auth} command-line option returns a
        L{Deferred} that returns the avatar id when presented with credentials
        that are known to that checker.
        rrrr%cs��|�j�Sr*)r"�username)r4��correctrrrr)Ksz2FTPOptionsTests.test_authSuccess.<locals>.<lambda>)rr!rrr.rr/�addCallback)rr1rr5r�test_authSuccessAs
�z FTPOptionsTests.test_authSuccessN)
�__name__�
__module__�__qualname__�__doc__rrrr$r3r8rrrrrs		rN)
r<�twisted.credrr�twisted.pythonr�twisted.python.filepathr�twisted.tap.ftpr�twisted.trial.unittestrrrrrr�<module>s

Anon7 - 2022
AnonSec Team