§
    ÈtºfÛ  ã                   ón   — d Z ddlmZmZmZ ddlmZ ddlmZ  G d„ de¦  «        Z	 G d„ de¦  «        Z
d	S )
z<
Tests for basic constructs of L{twisted.cred.credentials}.
é    )ÚIUsernameHashedPasswordÚIUsernamePasswordÚUsernamePassword)Ú_uhpVersion)ÚTestCasec                   ó2   — e Zd ZdZdd„Zdd„Zdd„Zdd„ZdS )	ÚUsernamePasswordTestsz(
    Tests for L{UsernamePassword}.
    ÚreturnNc                 ó’   — t          dd¦  «        }|                      |j        d¦  «         |                      |j        d¦  «         dS )zo
        The initialisation of L{UsernamePassword} will set C{username} and
        C{password} on it.
        ó   fooó   barN)r   ÚassertEqualÚusernameÚpassword©ÚselfÚcredss     ú`/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/cred/test/test_simpleauth.pyÚtest_initialisationz)UsernamePasswordTests.test_initialisation   sI   € õ
 ! ¨Ñ0Ô0ˆØ×Ò˜œ¨Ñ0Ô0Ð0Ø×Ò˜œ¨Ñ0Ô0Ð0Ð0Ð0ó    c                 óv   — t          dd¦  «        }|                      |                     d¦  «        ¦  «         dS )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_correctPasswordz*UsernamePasswordTests.test_correctPassword    s9   € õ
 ! ¨'Ñ2Ô2ˆØ�Š˜×+Ò+¨GÑ4Ô4Ñ5Ô5Ð5Ð5Ð5r   c                 óv   — t          dd¦  «        }|                      |                     d¦  «        ¦  «         dS )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_wrongPasswordz(UsernamePasswordTests.test_wrongPassword(   s<   € õ
 ! ¨'Ñ2Ô2ˆØ×Ò˜×,Ò,Ð-=Ñ>Ô>Ñ?Ô?Ð?Ð?Ð?r   c                 ó^   — |                       t          j        t          ¦  «        ¦  «         dS )zF
        L{UsernamePassword} implements L{IUsernamePassword}.
        N)r   r   ÚimplementedByr   )r   s    r   Útest_interfacez$UsernamePasswordTests.test_interface0   s)   € ð 	�ŠÕ)Ô7Õ8HÑIÔIÑJÔJÐJÐJÐJr   ©r
   N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r    r#   © r   r   r	   r	      sx   € € € € € ðð ð1ð 1ð 1ð 1ð6ð 6ð 6ð 6ð@ð @ð @ð @ðKð Kð Kð Kð Kð Kr   r	   c                   ó2   — e Zd ZdZdd„Zdd„Zdd„Zdd„ZdS )	ÚUsernameHashedPasswordTestsz.
    Tests for L{UsernameHashedPassword}.
    r
   Nc                 óÂ   — |                       ddt          ¦  «        } |dd¦  «        }|                      |j        d¦  «         |                      |j        d¦  «         dS )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/   r   s      r   r   z/UsernameHashedPasswordTests.test_initialisation<   sl   € ð
 "&×!BÒ!BØ&Ð(@Å+ñ"
ô "
Ðð 'Ð& v¨vÑ6Ô6ˆØ×Ò˜œ¨Ñ0Ô0Ð0Ø×Ò˜œ vÑ.Ô.Ð.Ð.Ð.r   c                 ó¦   — |                       ddt          ¦  «        } |dd¦  «        }|                      |                     d¦  «        ¦  «         dS )zœ
        Calling C{checkPassword} on a L{UsernameHashedPassword} will return
        L{True} when the password given is the password on the object.
        r.   r/   r   r   N)r0   r   r   r   r2   s      r   r   z0UsernameHashedPasswordTests.test_correctPasswordH   s\   € ð
 "&×!BÒ!BØ&Ð(@Å+ñ"
ô "
Ðð 'Ð& w°Ñ8Ô8ˆØ�Š˜×+Ò+¨GÑ4Ô4Ñ5Ô5Ð5Ð5Ð5r   c                 ó¦   — |                       ddt          ¦  «        } |dd¦  «        }|                      |                     d¦  «        ¦  «         dS )z¡
        Calling C{checkPassword} on a L{UsernameHashedPassword} will return
        L{False} when the password given is NOT the password on the object.
        r.   r/   r   r   r   N)r0   r   r   r   r2   s      r   r    z.UsernameHashedPasswordTests.test_wrongPasswordS   s_   € ð
 "&×!BÒ!BØ&Ð(@Å+ñ"
ô "
Ðð 'Ð& w°Ñ8Ô8ˆØ×Ò˜×,Ò,Ð-=Ñ>Ô>Ñ?Ô?Ð?Ð?Ð?r   c                 óŒ   — |                       ddt          ¦  «        }|                      t          j        |¦  «        ¦  «         dS )zR
        L{UsernameHashedPassword} implements L{IUsernameHashedPassword}.
        r.   r/   N)r0   r   r   r   r"   )r   r/   s     r   r#   z*UsernameHashedPasswordTests.test_interface^   sI   € ð "&×!BÒ!BØ&Ð(@Å+ñ"
ô "
Ðð 	�ŠÕ/Ô=Ð>TÑUÔUÑVÔVÐVÐVÐVr   r$   r%   r*   r   r   r,   r,   7   sx   € € € € € ðð ð
/ð 
/ð 
/ð 
/ð	6ð 	6ð 	6ð 	6ð	@ð 	@ð 	@ð 	@ðWð Wð Wð Wð Wð Wr   r,   N)r)   Útwisted.cred.credentialsr   r   r   Útwisted.cred.test.test_credr   Útwisted.trial.unittestr   r	   r,   r*   r   r   ú<module>r9      sØ   ððð ð
ð ð ð ð ð ð ð ð ð ð
 4Ð 3Ð 3Ð 3Ð 3Ð 3Ø +Ð +Ð +Ð +Ð +Ð +ð"Kð "Kð "Kð "Kð "K˜Hñ "Kô "Kð "KðJ.Wð .Wð .Wð .Wð .W (ñ .Wô .Wð .Wð .Wð .Wr   