Revision 53fde1ac test/py/ganeti.hypervisor_unittest.py

b/test/py/ganeti.hypervisor_unittest.py
1 1
#!/usr/bin/python
2 2
#
3 3

  
4
# Copyright (C) 2010 Google Inc.
4
# Copyright (C) 2010, 2013 Google Inc.
5 5
#
6 6
# This program is free software; you can redistribute it and/or modify
7 7
# it under the terms of the GNU General Public License as published by
......
28 28
from ganeti import objects
29 29
from ganeti import errors
30 30
from ganeti import hypervisor
31
from ganeti.hypervisor import hv_base
31 32

  
32 33
import testutils
33 34

  
......
48 49
                        (hv, pname))
49 50

  
50 51

  
52
class TestBase(unittest.TestCase):
53
  def testVerifyResults(self):
54
    fn = hv_base.BaseHypervisor._FormatVerifyResults
55
    # FIXME: use assertIsNone when py 2.7 is minimum supported version
56
    self.assertEqual(fn([]), None)
57
    self.assertEqual(fn(["a"]), "a")
58
    self.assertEqual(fn(["a", "b"]), "a; b")
59

  
60

  
51 61
if __name__ == "__main__":
52 62
  testutils.GanetiTestProgram()

Also available in: Unified diff