Пример #1
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')
Пример #2
0
 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')
Пример #3
0
 def test_swver(self, mock_execute):
     mock_execute.side_effect = self._mock_manager
     self.facts['master'] = 'RE0'
     software_version(self.dev, self.facts)
     self.assertEqual(self.facts['version'], '12.3R6.6')
Пример #4
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')
Пример #5
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')
Пример #6
0
 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')
Пример #7
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')
Пример #8
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')
Пример #9
0
 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")
Пример #10
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")
Пример #11
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")