Revision 86e16e3f

b/test/py/ganeti.backend_unittest.py
655 655
  def testValid(self):
656 656
    path = "somepath"
657 657
    excl_stor = True
658
    orig_fn = backend._GetVgInfo
658 659
    backend._GetVgInfo = mock.Mock()
659 660
    backend._GetLvmVgSpaceInfo(path, [excl_stor])
660 661
    backend._GetVgInfo.assert_called_with(path, excl_stor)
662
    backend._GetVgInfo = orig_fn
661 663

  
662 664
  def testNoExclStorageNotBool(self):
663 665
    path = "somepath"
......
737 739
  _SOME_RESULT = None
738 740

  
739 741
  def testApplyStorageInfoFunction(self):
742
    orig_fn = backend._ApplyStorageInfoFunction
740 743
    backend._ApplyStorageInfoFunction = mock.Mock(
741 744
        return_value=self._SOME_RESULT)
742 745
    storage_units = [(st, st + "_key", [st + "_params"]) for st in
......
751 754
      self.assertEqual(storage_type + "_key", storage_key)
752 755
      self.assertEqual([storage_type + "_params"], storage_params)
753 756
      self.assertTrue(storage_type in constants.VALID_STORAGE_TYPES)
757
    backend._ApplyStorageInfoFunction = orig_fn
754 758

  
755 759

  
756 760
if __name__ == "__main__":

Also available in: Unified diff