def test_swver_exception_handling(self, mock_re_findall, mock_execute): mock_execute.side_effect = self._mock_manager mock_re_findall.side_effect = IndexError self.facts['master'] = 'RE0' software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '0.0I0.0')
def test_swver_hostname_none(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts['master'] = 'RE5' self.facts['version_RE5'] = '15.3R6.6' software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '15.3R6.6')
def test_swver_txp_master_list(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts['master'] = ['RE0', 'RE0', 'RE1', 'RE2', 'RE3'] self.facts['version_RE0-RE0'] = '14.2R4' software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '14.2R4')
def test_swver_exception_handling(self, mock_re_findall, mock_execute): mock_execute.side_effect = self._mock_manager mock_re_findall.side_effect = IndexError self.facts['master'] = 'RE0' software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '0.0I0.0')
def test_swver_f_master_list(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts['master'] = ['RE0', 'RE1'] software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '12.3R6.6')
def test_swver_hostname_none(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts['master'] = 'RE5' self.facts['version_RE5'] = '15.3R6.6' software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '15.3R6.6')
def test_swver_txp_master_list(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts['master'] = ['RE0', 'RE0', 'RE1', 'RE2', 'RE3'] self.facts['version_RE0-RE0'] = '14.2R4' software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '14.2R4')
def test_swver_f_master_list(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts['master'] = ['RE0', 'RE1'] software_version(self.dev, self.facts) self.assertEqual(self.facts['version'], '12.3R6.6')
def test_swver_exception_handling(self, mock_re_findall, mock_execute): mock_execute.side_effect = self._mock_manager mock_re_findall.side_effect = IndexError self.facts["master"] = "RE0" software_version(self.dev, self.facts) self.assertEqual(self.facts["version"], "0.0I0.0")
def test_swver_txp_master_list(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts["master"] = ["RE0", "RE0", "RE1", "RE2", "RE3"] self.facts["version_RE0-RE0"] = "14.2R4" software_version(self.dev, self.facts) self.assertEqual(self.facts["version"], "14.2R4")
def test_swver_hostname_none(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts["master"] = "RE5" self.facts["version_RE5"] = "15.3R6.6" software_version(self.dev, self.facts) self.assertEqual(self.facts["version"], "15.3R6.6")
def test_swver_f_master_list(self, mock_execute): mock_execute.side_effect = self._mock_manager self.facts["master"] = ["RE0", "RE1"] software_version(self.dev, self.facts) self.assertEqual(self.facts["version"], "12.3R6.6")