ó
    Ö›‘hÛ  ã                   ó`   • S r SSKJrJrJr  SSKJr  SSKJr   " S S\5      r	 " S S\5      r
g	)
z<
Tests for basic constructs of L{twisted.cred.credentials}.
é    )ÚIUsernameHashedPasswordÚIUsernamePasswordÚUsernamePassword)Ú_uhpVersion)ÚTestCasec                   ó@   • \ rS rSrSrS	S jrS	S jrS	S jrS	S jrSr	g)
ÚUsernamePasswordTestsé   z 
Tests for L{UsernamePassword}.
Nc                 óŒ   • [        SS5      nU R                  UR                  S5        U R                  UR                  S5        g)zW
The initialisation of L{UsernamePassword} will set C{username} and
C{password} on it.
ó   fooó   barN)r   ÚassertEqualÚusernameÚpassword©ÚselfÚcredss     ÚeC:\Users\psant\Downloads\Noiseback\school\venv\Lib\site-packages\twisted/cred/test/test_simpleauth.pyÚtest_initialisationÚ)UsernamePasswordTests.test_initialisation   s8   € ô
 ! ¨Ó0ˆØ×Ñ˜Ÿ™¨Ô0Ø×Ñ˜Ÿ™¨Õ0ó    c                 ó\   • [        SS5      nU R                  UR                  S5      5        g)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   s     r   Útest_correctPasswordÚ*UsernamePasswordTests.test_correctPassword    s'   € ô
 ! ¨'Ó2ˆØ�‰˜×+Ñ+¨GÓ4Õ5r   c                 ó\   • [        SS5      nU R                  UR                  S5      5        g)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   s     r   Útest_wrongPasswordÚ(UsernamePasswordTests.test_wrongPassword(   s*   € ô
 ! ¨'Ó2ˆØ×Ñ˜×,Ñ,Ð-=Ó>Õ?r   c                 óV   • U R                  [        R                  " [        5      5        g)z6
L{UsernamePassword} implements L{IUsernamePassword}.
N)r   r   ÚimplementedByr   )r   s    r   Útest_interfaceÚ$UsernamePasswordTests.test_interface0   s   € ð 	�‰Ô)×7Ò7Ô8HÓIÕJr   © ©ÚreturnN©
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r"   r&   Ú__static_attributes__r(   r   r   r	   r	      s   † ñô1ô6ô@÷Kr   r	   c                   ó@   • \ rS rSrSrS	S jrS	S jrS	S jrS	S jrSr	g)
ÚUsernameHashedPasswordTestsé7   z&
Tests for L{UsernameHashedPassword}.
Nc                 ó´   • U R                  SS[        5      nU" SS5      nU R                  UR                  S5        U R                  UR                  S5        g)z[
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   r7   r   s      r   r   Ú/UsernameHashedPasswordTests.test_initialisation<   sS   € ð
 "&×!BÑ!BØ&Ð(@Ä+ó"
Ðñ ' v¨vÓ6ˆØ×Ñ˜Ÿ™¨Ô0Ø×Ñ˜Ÿ™ vÕ.r   c                 ó„   • U R                  SS[        5      nU" SS5      nU R                  UR                  S5      5        g)z„
Calling C{checkPassword} on a L{UsernameHashedPassword} will return
L{True} when the password given is the password on the object.
r6   r7   r   r   N)r8   r   r   r   r:   s      r   r   Ú0UsernameHashedPasswordTests.test_correctPasswordH   sB   € ð
 "&×!BÑ!BØ&Ð(@Ä+ó"
Ðñ ' w°Ó8ˆØ�‰˜×+Ñ+¨GÓ4Õ5r   c                 ó„   • U R                  SS[        5      nU" SS5      nU R                  UR                  S5      5        g)z‰
Calling C{checkPassword} on a L{UsernameHashedPassword} will return
L{False} when the password given is NOT the password on the object.
r6   r7   r   r   r    N)r8   r   r!   r   r:   s      r   r"   Ú.UsernameHashedPasswordTests.test_wrongPasswordS   sE   € ð
 "&×!BÑ!BØ&Ð(@Ä+ó"
Ðñ ' w°Ó8ˆØ×Ñ˜×,Ñ,Ð-=Ó>Õ?r   c                 ó|   • U R                  SS[        5      nU R                  [        R                  " U5      5        g)zB
L{UsernameHashedPassword} implements L{IUsernameHashedPassword}.
r6   r7   N)r8   r   r   r   r%   )r   r7   s     r   r&   Ú*UsernameHashedPasswordTests.test_interface^   s8   € ð "&×!BÑ!BØ&Ð(@Ä+ó"
Ðð 	�‰Ô/×=Ò=Ð>TÓUÕVr   r(   r)   r+   r(   r   r   r3   r3   7   s   † ñô
/ô	6ô	@÷Wr   r3   N)r0   Útwisted.cred.credentialsr   r   r   Útwisted.cred.test.test_credr   Útwisted.trial.unittestr   r	   r3   r(   r   r   Ú<module>rE      s9   ðñ÷
ñ õ
 4Ý +ô"K˜Hô "KôJ.W (õ .Wr   