X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/432e8e2f3a21139d6e1bb39b4a38448e2af0f902..fd9f58fd334249d86cd4ea4b920d21d97439ea7d:/test/ganeti.objects_unittest.py diff --git a/test/ganeti.objects_unittest.py b/test/ganeti.objects_unittest.py index 95978c5..19b75c1 100755 --- a/test/ganeti.objects_unittest.py +++ b/test/ganeti.objects_unittest.py @@ -32,22 +32,22 @@ import testutils class SimpleObject(objects.ConfigObject): - __slots__ = ['a', 'b'] + __slots__ = ["a", "b"] class TestDictState(unittest.TestCase): """Simple dict tansformation tests""" def testSimpleObjectToDict(self): - o1 = SimpleObject(a='1') - self.assertEquals(o1.ToDict(), {'a': '1'}) - self.assertEquals(o1.__getstate__(), {'a': '1'}) + o1 = SimpleObject(a="1") + self.assertEquals(o1.ToDict(), {"a": "1"}) + self.assertEquals(o1.__getstate__(), {"a": "1"}) self.assertEquals(o1.__getstate__(), o1.ToDict()) o1.a = 2 o1.b = 5 - self.assertEquals(o1.ToDict(), {'a': 2, 'b': 5}) + self.assertEquals(o1.ToDict(), {"a": 2, "b": 5}) o2 = SimpleObject.FromDict(o1.ToDict()) - self.assertEquals(o1.ToDict(), {'a': 2, 'b': 5}) + self.assertEquals(o1.ToDict(), {"a": 2, "b": 5}) class TestClusterObject(unittest.TestCase): @@ -348,5 +348,5 @@ class TestNode(unittest.TestCase): self.assertEqual(node2.disk_state[constants.LD_LV]["lv32352"].total, 128) -if __name__ == '__main__': +if __name__ == "__main__": testutils.GanetiTestProgram()