Example #1
0
 def test_match_runtime_error(self):
     '''
     Test if it matches for path expression
     '''
     mock = MagicMock(side_effect=RuntimeError('error'))
     with patch.object(_Augeas, 'match', mock):
         self.assertEqual(augeas_cfg.match('/etc/service-name', 'ssh'), {})
 def test_match_runtime_error(self):
     """
     Test if it matches for path expression
     """
     mock = MagicMock(side_effect=RuntimeError("error"))
     with patch.object(_Augeas, "match", mock):
         self.assertEqual(augeas_cfg.match("/etc/service-name", "ssh"), {})
Example #3
0
 def test_match_runtime_error(self):
     '''
     Test if it matches for path expression
     '''
     mock = MagicMock(side_effect=RuntimeError('error'))
     with patch.object(_Augeas, 'match', mock):
         self.assertEqual(augeas_cfg.match('/etc/service-name', 'ssh'), {})
Example #4
0
 def test_match(self):
     '''
     Test if it matches for path expression
     '''
     self.assertEqual(augeas_cfg.match('/etc/service', 'ssh'), {})
 def test_match(self):
     """
     Test if it matches for path expression
     """
     self.assertEqual(augeas_cfg.match("/etc/service", "ssh"), {})
Example #6
0
 def test_match(self):
     '''
     Test if it matches for path expression
     '''
     self.assertEqual(augeas_cfg.match('/etc/service', 'ssh'), {})