
     hB                     ~    d Z ddlmZ ddlZ ej                  e      ZddlmZm	Z
 ddlmZ ddlmZ  G d de      Zy)	ztest passlib.hosts    )with_statementN)hostshash)unix_crypt_schemes)TestCasec                   (    e Zd ZdZd Zd Zd Zd Zy)	HostsTestz0perform general tests to make sure contexts workc                     dD ]D  }| j                  |j                  |      d       | j                  |j                  d|             F y )N) !*z#!$1$TXl/FX/U$BZge.lr.ux6ekjEjxmzwz0unix_disabledtest)assertEqualidentifyassertFalseverifyselfctxr   s      Z/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/passlib/tests/test_hosts.pycheck_unix_disabledzHostsTest.check_unix_disabled   sG    
 	7D S\\$/ASZZ56	7    c                     t         j                  }dD ]#  }| j                  |j                  d|             % | j	                  |       y )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_contextzHostsTest.test_linux_context%   sG    !!
 	6D OOCJJvt45	6 	  %r   c                    t         j                  t         j                  t         j                  fD ]  }dD ]#  }| j	                  |j                  d|             % d}t        j                  j                         r"| j	                  |j                  d|             n!| j                  |j                  |      d       | j                  |        y )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_contextszHostsTest.test_bsd_contexts2   s    !!!!  
 	*C
 : 

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

62 67  b!18<$$S)	*r   c                    t        t        dd       }|s| j                  d      S t        |j	                               }| j                  |d       | j                  d|v        |j                  d       | j                  |d       | j                  t        t              j                  |             | j                  |       dD ]+  \  }}||v s| j                  |j                  d|             - y )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   r4   schemer   s        r   test_host_contextzHostsTest.test_host_contextD   s    e^T2==!NOO s{{}%!ef723'!MN./::7CD 	  %
 		:LFD  

64 89		:r   N)__name__
__module____qualname____doc__r   r!   r*   r9    r   r   r	   r	      s    :7&*$:r   r	   )r=   
__future__r   logging	getLoggerr:   logpasslibr   r   r'   passlib.utilsr   passlib.tests.utilsr   r	   r>   r   r   <module>rF      s;     & 'g''1 + , (K: K:r   