Revision 9b85ede9 test/py/ganeti.utils.version_unittest.py

b/test/py/ganeti.utils.version_unittest.py
72 72
        self.assertFalse(version.IsCorrectConfigVersion((3,10,0), (2,10,0)))
73 73

  
74 74

  
75
class IsBeforeTest(unittest.TestCase):
76
    def testIsBefore(self):
77
        self.assertTrue(version.IsBefore(None, 2, 10, 0))
78
        self.assertFalse(version.IsBefore((2, 10, 0), 2, 10, 0))
79
        self.assertTrue(version.IsBefore((2, 10, 0), 2, 10, 1))
80
        self.assertFalse(version.IsBefore((2, 10, 1), 2, 10, 0))
81
        self.assertTrue(version.IsBefore((2, 10, 1), 2, 11, 0))
82
        self.assertFalse(version.IsBefore((2, 11, 0), 2, 10, 3))
83

  
84

  
75 85
if __name__ == "__main__":
76 86
  testutils.GanetiTestProgram()

Also available in: Unified diff