Пример #1
0
 def test_get_swver_vc_capable_standalone(self):
     def raise_ex(*args):
         if args[0] == 'show version all-members':
             raise RpcError()
     self.dev.rpc.cli = MagicMock(
         side_effect=lambda *args, **kwargs: raise_ex(*args))
     self.facts['vc_capable'] = True
     _get_swver(self.dev, self.facts)
     self.dev.rpc.cli.assert_called_with('show version invoke-on all-routing-engines',
                                         format='xml')
Пример #2
0
 def test_get_swver_vc(self):
     self.dev.rpc.cli = MagicMock()
     self.facts['vc_capable'] = True
     _get_swver(self.dev, self.facts)
     self.dev.rpc.cli.assert_called_with('show version all-members',
                                         format='xml')
Пример #3
0
 def test_get_swver_vc(self):
     self.dev.rpc.cli = MagicMock()
     self.facts['vc_capable'] = True
     _get_swver(self.dev, self.facts)
     self.dev.rpc.cli.assert_called_with('show version all-members', format='xml')