Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ 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/cred/test/__pycache__/ |
Upload File : |
o �b� � @ sT d Z ddlmZmZmZ ddlmZ ddlmZ G dd� de�Z G dd� de�Z d S ) z< Tests for basic constructs of L{twisted.cred.credentials}. � )�IUsernameHashedPassword�IUsernamePassword�UsernamePassword)�_uhpVersion)�TestCasec @ �0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd S )�UsernamePasswordTestsz( Tests for L{UsernamePassword}. c C s* t dd�}| �|jd� | �|jd� dS )zo The initialisation of L{UsernamePassword} will set C{username} and C{password} on it. � foo� barN)r �assertEqual�username�password��self�creds� r �C/usr/lib/python3/dist-packages/twisted/cred/test/test_simpleauth.py�test_initialisation s z)UsernamePasswordTests.test_initialisationc C s t dd�}| �|�d�� dS )z� Calling C{checkPassword} on a L{UsernamePassword} will return L{True} when the password given is the password on the object. � user� passN)r � assertTrue� checkPasswordr r r r �test_correctPassword � z*UsernamePasswordTests.test_correctPasswordc C s t dd�}| �|�d�� dS )z� Calling C{checkPassword} on a L{UsernamePassword} will return L{False} when the password given is NOT the password on the object. r r � someotherpassN)r �assertFalser r r r r �test_wrongPassword( r z(UsernamePasswordTests.test_wrongPasswordc C s | � t�t�� dS )zF L{UsernamePassword} implements L{IUsernamePassword}. N)r r � implementedByr )r r r r �test_interface0 s z$UsernamePasswordTests.test_interfaceN��__name__� __module__�__qualname__�__doc__r r r r r r r r r s r c @ r )�UsernameHashedPasswordTestsz. Tests for L{UsernameHashedPassword}. c C s8 | � ddt�}|dd�}| �|jd� | �|jd� dS )zs The initialisation of L{UsernameHashedPassword} will set C{username} and C{hashed} on it. �twisted.cred.credentials�UsernameHashedPasswordr r N)�getDeprecatedModuleAttributer r r �hashed�r r&