+
    üÐj˜
  ã                   ó`   € R t ^ RIHtHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht  ! R R]4      tR# )	z
Tests for L{twisted.tap.ftp}.
)ÚcredentialsÚerror)Úversions)ÚFilePath)ÚOptions)ÚTestCasec                   ój   a € ] tR t^t o RtRtV 3R lR ltV 3R lR ltV 3R lR ltR t	R	 t
R
tV tR# )ÚFTPOptionsTestszB
Tests for the command line option parser used for C{twistd ftp}.
c                ó   <€ V ^8„  d   QhRR/# ©é   ÚreturnN© )ÚformatÚ__classdict__s   "€Ú?/usr/lib/python3/dist-packages/twisted/test/test_ftp_options.pyÚ__annotate__ÚFTPOptionsTests.__annotate__   s   ø€ ÷ !ñ !�tñ !ó    c                óÌ   € V P                  4       V n        \        V P                  4      pVP                  RP	                  V P
                  4      4       \        4       V n        R# )z
Create a file with two users.
ó   :N)ÚmktempÚfilenamer   Ú
setContentÚjoinÚusernamePasswordr   Úoptions)ÚselfÚfs   & r   ÚsetUpÚFTPOptionsTests.setUp   sC   € ð Ÿ™›ˆŒÜ�T—]‘]Ó#ˆØ	�‰�T—Y‘Y˜t×4Ñ4Ó5Ô6Ü“yˆŽr   c                ó   <€ V ^8„  d   QhRR/# r   r   )r   r   s   "€r   r   r      s   ø€ ÷ 	
ñ 	
¨dñ 	
r   c                ó–   € V P                  \        P                  ! R^^^ 4      V P                  P                  V P
                  4       R# )z[
The C{--password-file} option will emit a warning stating that
said option is deprecated.
ÚTwistedN)ÚcallDeprecatedr   ÚVersionr   Úopt_password_filer   )r   s   &r   Útest_passwordfileDeprecationÚ,FTPOptionsTests.test_passwordfileDeprecation   s:   € ð
 	×ÑÜ×Ò˜Y¨¨A¨qÓ1Ø�L‰L×*Ñ*Ø�M‰Mö	
r   c                ó   <€ V ^8„  d   QhRR/# r   r   )r   r   s   "€r   r   r   *   s   ø€ ÷ Mñ M ñ Mr   c                ó   € \        V P                  R,          4      pV P                  P                  RRV P                  ,           .4       V P	                  \        V P                  R,          4      V^,           4       R# )zN
The C{--auth} command-line option will add a checker to the list of
checkers
ÚcredCheckersú--authúfile:N)Úlenr   ÚparseOptionsr   ÚassertEqual)r   ÚnumCheckerss   & r   Útest_authAddedÚFTPOptionsTests.test_authAdded*   sY   € ô
 ˜$Ÿ,™, ~Õ6Ó7ˆØ�‰×!Ñ! 8¨W°t·}±}Õ-DÐ"EÔFØ×Ñœ˜TŸ\™\¨.Õ9Ó:¸KÈ!½OÖLr   c                ó0  a € S P                   P                  RRS P                  ,           .4       S P                   R,          R,          p\        P                  ! S P
                  ^ ,          R4      pVP                  V4      P                  V 3R lR 4      # )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.
r,   r-   r+   Úfakec                 ó&   <€ SP                  R 4      # )z!Wrong password should raise error)Úfail)Úignorer   s   &€r   Ú<lambda>Ú2FTPOptionsTests.test_authFailure.<locals>.<lambda>=   s   ø€ ˜4Ÿ9™9Ð%HÔIr   c                 ó@   € V P                  \        P                  4      # ©N)Útrapr   ÚUnauthorizedLogin)Úerrs   &r   r9   r:   >   s   € ˜Ÿ™¤×!8Ñ!8Ô9r   éÿÿÿÿ)r   r/   r   r   ÚUsernamePasswordr   ÚrequestAvatarIdÚaddCallbacks)r   ÚcheckerÚinvalids   f  r   Útest_authFailureÚ FTPOptionsTests.test_authFailure3   sy   ø€ ð 	�‰×!Ñ! 8¨W°t·}±}Õ-DÐ"EÔFØ—,‘,˜~Õ.¨rÕ2ˆÜ×.Ò.¨t×/DÑ/DÀQÕ/GÈÓPˆØ×&Ñ& wÓ/×<Ñ<ÜIÙ9ó
ð 	
r   c                ó  a a€ S P                   P                  RRS P                  ,           .4       S P                   R,          R,          p\        P                  ! S P
                  !  oVP                  S4      P                  VV 3R l4      # )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.
r,   r-   r+   c                 ó<   <€ SP                  V SP                  4      # r<   )r0   Úusername)rJ   Úcorrectr   s   &€€r   r9   Ú2FTPOptionsTests.test_authSuccess.<locals>.<lambda>K   s   ø€ ˜T×-Ñ-¨h¸×8HÑ8HÔIr   r@   )r   r/   r   r   rA   r   rB   ÚaddCallback)r   rD   rK   s   f @r   Útest_authSuccessÚ FTPOptionsTests.test_authSuccessA   so   ù€ ð 	�‰×!Ñ! 8¨W°t·}±}Õ-DÐ"EÔFØ—,‘,˜~Õ.¨rÕ2ˆÜ×.Ò.°×0EÑ0EÑFˆØ×&Ñ& wÓ/×;Ñ;ÝIó
ð 	
r   )r   r   N)s   iamusers   thisispassword)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r'   r2   rF   rN   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r	   r	      sA   ø‡ € ñð 7Ð÷!ð !÷	
ð 	
÷Mð Mò
÷
ð 
r   r	   N)rT   Útwisted.credr   r   Útwisted.pythonr   Útwisted.python.filepathr   Útwisted.tap.ftpr   Útwisted.trial.unittestr   r	   r   r   r   Ú<module>r\      s'   ðñ÷ ,Ý #Ý ,Ý #Ý +ô=
�hö =
r   