ia64/xen-unstable

view tools/python/xen/xend/tests/test_uuid.py @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents edeeddb1bbf9
children
line source
1 import unittest
3 from xen.xend import uuid
6 class test_uuid(unittest.TestCase):
8 def testStringRoundtrip(self):
9 def t(inp):
10 self.assertEqual(uuid.fromString(uuid.toString(inp)), inp)
12 t(uuid.create())
13 t(uuid.create())
14 t(uuid.create())
15 t(uuid.create())
16 t(uuid.create())
19 def testToFromString(self):
20 def t(inp, expected):
21 self.assertEqual(uuid.toString(inp), expected)
22 self.assertEqual(uuid.fromString(expected), inp)
24 t([0 for _ in range(0, 16)], "00000000-0000-0000-0000-000000000000")
25 t([185, 158, 125, 206, 250, 178, 125, 57, 2, 6, 162, 74, 178, 236,
26 196, 5], "b99e7dce-fab2-7d39-0206-a24ab2ecc405")
29 def test_suite():
30 return unittest.makeSuite(test_uuid)