Exemplo n.º 1
0
    def test_exception_is_raised_on_json_server_error(self):
        drv = arista.AristaRPCWrapper()

        drv._server = mock.MagicMock()
        drv._server.runCmds.side_effect = Exception('server error')
        self.assertRaises(arista_exc.AristaRpcError, drv.get_tenants)
Exemplo n.º 2
0
 def setUp(self):
     super(PositiveRPCWrapperValidConfigTestCase, self).setUp()
     setup_valid_config()
     self.drv = arista.AristaRPCWrapper()
     self.region = 'RegionOne'
     self.drv._server = mock.MagicMock()