コード例 #1
0
 def test_finger_master(self):
     '''
     Test for finger
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.object(salt.utils, 'pem_finger', return_value='A'):
             with patch.dict(key.__opts__, {'pki_dir': 'A'}):
                 self.assertEqual(key.finger_master(), 'A')
コード例 #2
0
ファイル: key_test.py プロジェクト: DaveQB/salt
 def test_finger_master(self):
     '''
     Test for finger
     '''
     with patch.object(os.path, 'join', return_value='A'):
         with patch.object(salt.utils,
                           'pem_finger', return_value='A'):
             with patch.dict(key.__opts__,
                             {'pki_dir': 'A'}):
                 self.assertEqual(key.finger_master(), 'A')
コード例 #3
0
ファイル: test_key.py プロジェクト: mamh-mixed/saltstack-salt
 def test_finger_master(self):
     """
     Test for finger
     """
     with patch.object(os.path, "join", return_value="A"):
         with patch.object(salt.utils.crypt, "pem_finger",
                           return_value="A"):
             with patch.dict(key.__opts__, {
                     "pki_dir": "A",
                     "hash_type": "sha256"
             }):
                 self.assertEqual(key.finger_master(), "A")