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"), {})
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"), {})