
    gB                     ~    S r SSKJr  SSKr\R                  " \5      rSSKJrJ	r
  SSKJr  SSKJr   " S S\5      rg)	ztest passlib.hosts    )with_statementN)hostshash)unix_crypt_schemes)TestCasec                   0    \ rS rSrSrS rS rS rS rSr	g)		HostsTest   z0perform general tests to make sure contexts workc                     S HE  nU R                  UR                  U5      S5        U R                  UR                  SU5      5        MG     g )N) !*z#!$1$TXl/FX/U$BZge.lr.ux6ekjEjxmzwz0unix_disabledtest)assertEqualidentifyassertFalseverifyselfctxr   s      Q/home/matz/Project1/venv/lib/python3.13/site-packages/passlib/tests/test_hosts.pycheck_unix_disabledHostsTest.check_unix_disabled   sB    
D S\\$/ASZZ56
    c                     [         R                  nS H$  nU R                  UR                  SU5      5        M&     U R	                  U5        g )N)w$6$rounds=41128$VoQLvDjkaZ6L6BIE$4pt.1Ll1XdDYduEwEYPCMOBiR6W6znsyUEoNlcVXpv2gKKIbQolgmTGe6uEEVJ7azUxuc8Tf7zV9SD2z7Ij751L$5$rounds=31817$iZGmlyBQ99JSB5n6$p4E.pdPBWx19OajgjLRiOW0itGnyxDGgMlDcOsfaI17"$1$TXl/FX/U$BZge.lr.ux6ekjEjxmzwz0kAJJz.Rwp0A/Ir   )r   linux_context
assertTruer   r   r   s      r   test_linux_contextHostsTest.test_linux_context%   sB    !!
D OOCJJvt45
 	  %r   c                    [         R                  [         R                  [         R                  4 H  nS H$  nU R	                  UR                  SU5      5        M&     Sn[        R                  R                  5       (       a"  U R	                  UR                  SU5      5        O!U R                  UR                  U5      S5        U R                  U5        M     g )N)r   r    r   z<$2a$04$yjDgE74RJkeqC0/1NheSSOrvKeu9IbKDpcQf/Ox3qsrRS/Kw42qISbcrypt)r   freebsd_contextopenbsd_contextnetbsd_contextr"   r   hashmodr&   has_backendr   r   r   )r   r   r   h1s       r   test_bsd_contextsHostsTest.test_bsd_contexts2   s    !!!!  
C
 

64 89	
 PB~~))++

62 67  b!18<$$S)
r   c                    [        [        SS 5      nU(       d  U R                  S5      $ [        UR	                  5       5      nU R                  US5        U R                  SU;   5        UR                  S5        U R                  US5        U R                  [        [        5      R                  U5      5        U R                  U5        S H-  u  p4X2;   d  M  U R                  UR                  SU5      5        M/     g )Nhost_contextz+host_context not available on this platformzBappears to be unix system, but no known schemes supported by cryptr   z*should have schemes beside fallback scheme))sha512_cryptr   )sha256_cryptr   )	md5_cryptr   )	des_cryptr    r   )getattrr   skipTestlistschemesr"   removesetr   
issupersetr   r   )r   r   r8   schemer   s        r   test_host_contextHostsTest.test_host_contextD   s    e^T2==!NOO s{{}%!ef723'!MN./::7CD 	  %
LF  

64 89
r    N)
__name__
__module____qualname____firstlineno____doc__r   r#   r-   r=   __static_attributes__r?   r   r   r	   r	      s    :7&*$:r   r	   )rD   
__future__r   logging	getLoggerr@   logpasslibr   r   r*   passlib.utilsr   passlib.tests.utilsr   r	   r?   r   r   <module>rM      s8     & g''1 + , (K: K:r   