Revision 38969795 test/py/ganeti.client.gnt_cluster_unittest.py

b/test/py/ganeti.client.gnt_cluster_unittest.py
286 286
    opts = mock.Mock()
287 287
    self.disableDrbd()
288 288
    opts.drbd_helper = "/bin/true"
289
    self.assertRaises(errors.OpPrereqError, gnt_cluster._InitDrbdHelper, opts,
290
        self.enabled_disk_templates)
289
    helper = gnt_cluster._InitDrbdHelper(opts, self.enabled_disk_templates)
290
    self.assertEquals(opts.drbd_helper, helper)
291 291

  
292 292
  def testDrbdHelperNone(self):
293 293
    opts = mock.Mock()
......
336 336
    opts = mock.Mock()
337 337
    self.disableDrbd()
338 338
    opts.drbd_helper = "/bin/true"
339
    self.assertRaises(errors.OpPrereqError, gnt_cluster._GetDrbdHelper, opts,
340
        self.enabled_disk_templates)
339
    helper = gnt_cluster._GetDrbdHelper(opts, None)
340
    self.assertEquals(opts.drbd_helper, helper)
341 341

  
342 342
  def testDrbdNoHelper(self):
343 343
    opts = mock.Mock()

Also available in: Unified diff