HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/twisted/cred/test/__pycache__/test_simpleauth.cpython-38.pyc
U


W[��@sldZddlmZmZddlmZddlmZmZddlm	Z	ddlm
Z
Gdd�de�ZGd	d
�d
e�ZdS)z<
Tests for basic constructs of L{twisted.cred.credentials}.
�)�division�absolute_import)�TestCase)�UsernamePassword�IUsernamePassword)�UsernameHashedPassword)�IUsernameHashedPasswordc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�UsernamePasswordTestsz(
    Tests for L{UsernamePassword}.
    cCs*tdd�}|�|jd�|�|jd�dS)zo
        The initialisation of L{UsernamePassword} will set C{username} and
        C{password} on it.
        �foo�barN)r�assertEqual�usernameZpassword��selfZcreds�r�C/usr/lib/python3/dist-packages/twisted/cred/test/test_simpleauth.py�test_initialisations
z)UsernamePasswordTests.test_initialisationcCstdd�}|�|�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�
checkPasswordrrrr�test_correctPasswords
z*UsernamePasswordTests.test_correctPasswordcCstdd�}|�|�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.
        rr�
someotherpassN)r�assertFalserrrrr�test_wrongPassword's
z(UsernamePasswordTests.test_wrongPasswordcCs|�t�t��dS)zF
        L{UsernamePassword} implements L{IUsernamePassword}.
        N)rr�
implementedByr�rrrr�test_interface0sz$UsernamePasswordTests.test_interfaceN��__name__�
__module__�__qualname__�__doc__rrrrrrrrr	s

		r	c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�UsernameHashedPasswordTestsz.
    Tests for L{UsernameHashedPassword}.
    cCs*tdd�}|�|jd�|�|jd�dS)zs
        The initialisation of L{UsernameHashedPassword} will set C{username}
        and C{hashed} on it.
        r
rN)rrr
Zhashedrrrrr<s
z/UsernameHashedPasswordTests.test_initialisationcCstdd�}|�|�d��dS)z�
        Calling C{checkPassword} on a L{UsernameHashedPassword} will return
        L{True} when the password given is the password on the object.
        rrN)rrrrrrrrFs
z0UsernameHashedPasswordTests.test_correctPasswordcCstdd�}|�|�d��dS)z�
        Calling C{checkPassword} on a L{UsernameHashedPassword} will return
        L{False} when the password given is NOT the password on the object.
        rrrN)rrrrrrrrOs
z.UsernameHashedPasswordTests.test_wrongPasswordcCs|�t�t��dS)zR
        L{UsernameHashedPassword} implements L{IUsernameHashedPassword}.
        N)rrrrrrrrrXs�z*UsernameHashedPasswordTests.test_interfaceNrrrrrr#8s

		r#N)
r"Z
__future__rrZtwisted.trial.unittestrZtwisted.cred.credentialsrrrrr	r#rrrr�<module>s(