Merge "Utilizes assertIn - tests/virt"

This commit is contained in:
Jenkins
2013-10-22 12:09:40 +00:00
committed by Gerrit Code Review
10 changed files with 37 additions and 37 deletions

View File

@@ -140,7 +140,7 @@ class FakeLibvirtTests(test.NoDBTestCase):
blockstats = dom.blockStats('vda')
self.assertEqual(len(blockstats), 5)
for x in blockstats:
self.assertTrue(type(x) in [int, long])
self.assertIn(type(x), [int, long])
def test_attach_detach(self):
conn = self.get_openAuth_curry_func()('qemu:///system')
@@ -163,7 +163,7 @@ class FakeLibvirtTests(test.NoDBTestCase):
self.assertEqual(info[1], 128000)
self.assertTrue(info[2] <= 128000)
self.assertEqual(info[3], 1)
self.assertTrue(type(info[4]) in [int, long])
self.assertIn(type(info[4]), [int, long])
def test_createXML_runs_domain(self):
conn = self.get_openAuth_curry_func()('qemu:///system')