Exemple #1
0
 def test_shadow_hash(self):
     '''
     Test for Generates a salted hash suitable for /etc/shadow.
     '''
     with patch.object(salt.utils.pycrypto,
                       'gen_hash', return_value='A'):
         self.assertEqual(mod_random.shadow_hash(), 'A')
Exemple #2
0
 def test_shadow_hash(self):
     '''
     Test for Generates a salted hash suitable for /etc/shadow.
     '''
     with patch.object(salt.utils.pycrypto,
                       'gen_hash', return_value='A'):
         self.assertEqual(mod_random.shadow_hash(), 'A')
def test_shadow_hash():
    """
    Test for Generates a salted hash suitable for /etc/shadow.
    """
    with patch.object(salt.utils.pycrypto, "gen_hash", return_value="A"):
        assert mod_random.shadow_hash() == "A"