Beispiel #1
0
 def test_gen_password(self):
     '''
     Test shadow.gen_password
     '''
     self.assertTrue(HAS_SHADOW)
     for algorithm, hash_info in six.iteritems(_HASHES):
         self.assertEqual(
             shadow.gen_password(_PASSWORD,
                                 crypt_salt=hash_info['pw_salt'],
                                 algorithm=algorithm), hash_info['pw_hash'])
Beispiel #2
0
 def test_gen_password(self):
     '''
     Test shadow.gen_password
     '''
     self.assertTrue(HAS_SHADOW)
     for algorithm, hash_info in _HASHES.iteritems():
         self.assertEqual(
             shadow.gen_password(
                 _PASSWORD,
                 crypt_salt=hash_info['pw_salt'],
                 algorithm=algorithm
             ),
             hash_info['pw_hash']
         )