def test_getInfo(self): conn = libvirt.openReadOnly(None) res = conn.getInfo() self.assertIn(res[0], ('i686', 'x86_64')) self.assertTrue(1024 <= res[1] <= 16384, "Memory unusually high or low.") self.assertTrue(1 <= res[2] <= 32, "Active CPU count unusually high or low.") self.assertTrue(800 <= res[3] <= 4500, "CPU speed unusually high or low.") self.assertTrue(res[2] <= (res[5] * res[6]), "More active CPUs than num_sockets*cores_per_socket")
def get_openReadOnly_curry_func(self): return lambda uri: libvirt.openReadOnly(uri)