Revision 63b883de test/ganeti.utils.text_unittest.py
b/test/ganeti.utils.text_unittest.py | ||
---|---|---|
576 | 576 |
self.assertRaises(AssertionError, utils.Truncate, "", i) |
577 | 577 |
|
578 | 578 |
|
579 |
class TestFormatKeyValue(unittest.TestCase): |
|
580 |
def test(self): |
|
581 |
self.assertEqual(utils.FormatKeyValue({}), []) |
|
582 |
self.assertEqual(utils.FormatKeyValue({1: 2}), ["1=2"]) |
|
583 |
self.assertEqual(utils.FormatKeyValue({ |
|
584 |
"zzz": "0", |
|
585 |
"aaa": "1", |
|
586 |
}), |
|
587 |
["aaa=1", "zzz=0"]) |
|
588 |
|
|
589 |
|
|
579 | 590 |
if __name__ == "__main__": |
580 | 591 |
testutils.GanetiTestProgram() |
Also available in: Unified diff