Пример #1
0
 def test_abc_glob(self):
     with mock.patch('salt.utils.files.fopen', self.mock_fp):
         with mock.patch('salt.roster.sshconfig._get_ssh_config_file'):
             self.mock_fp.return_value.__iter__.return_value = _SAMPLE_SSH_CONFIG.splitlines(
             )
             targets = sshconfig.targets('abc*')
     self.assertEqual(targets, _ABC_GLOB)
Пример #2
0
 def test_abc_glob(self):
     with patch("salt.utils.files.fopen", self.mock_fp):
         with patch("salt.roster.sshconfig._get_ssh_config_file"):
             targets = sshconfig.targets("abc*")
     self.assertEqual(targets, _ABC_GLOB)
Пример #3
0
 def test_all(self):
     with patch('salt.utils.files.fopen', self.mock_fp):
         with patch('salt.roster.sshconfig._get_ssh_config_file'):
             targets = sshconfig.targets('*')
     self.assertEqual(targets, _ALL)
Пример #4
0
 def test_abc_glob(self):
     with mock.patch('salt.utils.files.fopen', self.mock_fp):
         with mock.patch('salt.roster.sshconfig._get_ssh_config_file'):
             targets = sshconfig.targets('abc*')
     self.assertEqual(targets, _ABC_GLOB)