def testGetOtherVMs_NotConnected(self): """Test method for ScalarisVM.getOtherVMs() with a closed connection.""" vm = ScalarisVM() vm.close_connection() #self.assertRaises(scalaris.ConnectionError, vm.getOtherVMs(0)) vm.getOtherVMs(1) vm.close_connection()
def testGetOtherVMs_NotConnected(self): """Test method for ScalarisVM.getOtherVMs() with a closed connection.""" vm = ScalarisVM() vm.close_connection() #self.assertRaises(scalaris.ConnectionError, vm.getOtherVMs(0)) vm.getOtherVMs(1) vm.close_connection()
def _testGetOtherVMs(self, maxVMs): """Test method for ScalarisVM.getOtherVMs().""" vm = ScalarisVM() otherVMs = vm.getOtherVMs(maxVMs) self.assertTrue(len(otherVMs) <= maxVMs, "list too long: " + str(otherVMs)) for otherVMUrl in otherVMs: otherVM = ScalarisVM(JSONConnection(otherVMUrl)) otherVM.getInfo() otherVM.close_connection() vm.close_connection()
def _testGetOtherVMs(self, maxVMs): """Test method for ScalarisVM.getOtherVMs().""" vm = ScalarisVM() otherVMs = vm.getOtherVMs(maxVMs) self.assertTrue( len(otherVMs) <= maxVMs, "list too long: " + str(otherVMs)) for otherVMUrl in otherVMs: otherVM = ScalarisVM(JSONConnection(otherVMUrl)) otherVM.getInfo() otherVM.close_connection() vm.close_connection()