+
    üÐjl	  ã                  ó|   € ^ RI H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]
P                  4      tR	# )
é    )Úannotations)ÚcredentialsÚerror)ÚFilePasswordDB)Údefer)Úunittest)Útapc                  ó²   € ] tR t^tRtRt]P                  ! RR4      t]P                  ! RR4      t	R R lt
R R	 ltR
 R ltR R ltR R ltR R ltRtR# )ÚWordsTapTestsz/
Ensures that the twisted.words.tap API works.
s   admin:admin
joe:foo
s   admins   joes   barc               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNone© )Úformats   "Ú=/usr/lib/python3/dist-packages/twisted/words/test/test_tap.pyÚ__annotate__ÚWordsTapTests.__annotate__   s   € ÷ ñ �tñ ó    c                óä   € V P                  4       V n        \        V P                  R4      V n        V P                  P	                  V P
                  4       V P                  P                  4        R# )z
Create a file with two users.
ÚwbN)ÚmktempÚfilenameÚopenÚfileÚwriteÚPASSWD_TEXTÚflush©Úselfs   &r   ÚsetUpÚWordsTapTests.setUp   sG   € ð Ÿ™›ˆŒÜ˜Ÿ™¨Ó-ˆŒ	Ø�	‰	�‰˜×(Ñ(Ô)Ø�	‰	�‰Ör   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r      s   € ÷ ñ ˜$ñ r   c                ó:   € V P                   P                  4        R# )z 
Close the dummy user database.
N)r   Úcloser    s   &r   ÚtearDownÚWordsTapTests.tearDown   s   € ð 	�	‰	�‰Ör   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   %   s   € ÷ 4ñ 4˜tñ 4r   c                óˆ   € \         P                  ! 4       pVP                  RR.4       V P                  VR,          R4       R# )z=
Tests that the --hostname parameter gets passed to Options.
z
--hostnameÚmyhostÚhostnameN)r	   ÚOptionsÚparseOptionsÚassertEqual©r!   Úopts   & r   Útest_hostnameÚWordsTapTests.test_hostname%   s6   € ô �kŠk‹mˆØ×Ñ˜,¨Ð1Ô2Ø×Ñ˜˜Z�¨(Ö3r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   -   s   € ÷ ñ ˜Tñ r   c                ó    € \         P                  ! 4       pVP                  RV P                  P                  .4       V P                  V4       R# )z9
Tests the --passwd command for backwards-compatibility.
z--passwdN©r	   r-   r.   r   ÚnameÚ
_loginTestr0   s   & r   Útest_passwdÚWordsTapTests.test_passwd-   s6   € ô �kŠk‹mˆØ×Ñ˜* d§i¡i§n¡nÐ5Ô6Ø�‰˜Ör   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   5   s   € ÷ ñ ˜4ñ r   c                ó®   € \         P                  ! 4       pVP                  RRV P                  P                  ,           .4       V P                  V4       R# )z4
Tests that the --auth command generates a checker.
z--authzfile:Nr6   r0   s   & r   Ú	test_authÚWordsTapTests.test_auth5   s;   € ô �kŠk‹mˆØ×Ñ˜( G¨d¯i©i¯n©nÕ$<Ð=Ô>Ø�‰˜Ör   c               ó    € V ^8„  d   QhRRRR/# )r   r1   ztap.Optionsr   zdefer.Deferred[None]r   )r   s   "r   r   r   =   s   € ÷ Kñ K˜kð KÐ.Bñ Kr   c                ó@  a € S P                  \        VR,          4      ^4       VR,          ^ ,          pS P                  VP                  S P                  4      \
        P                  4       R V 3R llpVP                  S P                  4      P                  V4      # )z½
This method executes both positive and negative authentication
tests against whatever credentials checker has been stored in
the Options class.

@param opt: An instance of L{tap.Options}.
ÚcredCheckersc               ó    € V ^8„  d   QhRRRR/# )r   Úusernamezbytes | tuple[()]r   r   r   )r   s   "r   r   Ú.WordsTapTests._loginTest.<locals>.__annotate__K   s   € ÷ 	<ñ 	<Ð!2ð 	<°tñ 	<r   c                óT   <€ SP                  V SP                  P                  4       R # )N)r/   ÚadminrC   )rC   r!   s   &€r   Ú
_gotAvatarÚ,WordsTapTests._loginTest.<locals>._gotAvatarK   s   ø€ Ø×Ñ˜X t§z¡z×':Ñ':Ö;r   )	r/   ÚlenÚassertFailureÚrequestAvatarIdÚjoeWrongr   ÚUnauthorizedLoginrF   ÚaddCallback)r!   r1   ÚcheckerrG   s   f&  r   r8   ÚWordsTapTests._loginTest=   s‚   ø€ ð 	×Ñœ˜S Õ0Ó1°1Ô5Ø"% nÕ"5°aÕ"8ˆØ×ÑØ×#Ñ# D§M¡MÓ2´E×4KÑ4Kô	
÷	<ð 	<ð ×&Ñ& t§z¡zÓ2×>Ñ>¸zÓJÐJr   )r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   ÚUsernamePasswordrF   rL   r"   r'   r2   r9   r=   r8   Ú__static_attributes__r   r   r   r   r      sW   † ñð ,€KØ×(Ò(¨°8Ó<€EØ×+Ò+¨F°FÓ;€Hõõõ4õõ÷Kñ Kr   r   N)Ú
__future__r   Útwisted.credr   r   Útwisted.cred.checkersr   Útwisted.internetr   Útwisted.trialr   Útwisted.wordsr	   ÚTestCaser   r   r   r   Ú<module>r_      s/   ðõ #ç +Ý 0Ý "Ý "Ý ôAK�H×%Ñ%ö AKr   