Revision 1f350e0f test/py/ganeti.rapi.client_unittest.py

b/test/py/ganeti.rapi.client_unittest.py
619 619
  def testShutdownInstance(self):
620 620
    self.rapi.AddResponse("1487")
621 621
    self.assertEqual(1487, self.client.ShutdownInstance("foo-instance",
622
                                                        dry_run=True,
623
                                                        reason="NoMore"))
624
    self.assertHandler(rlib2.R_2_instances_name_shutdown)
625
    self.assertItems(["foo-instance"])
626
    self.assertDryRun()
627
    self.assertQuery("reason", ["NoMore"])
628

  
629
  def testShutdownInstanceDefaultReason(self):
630
    self.rapi.AddResponse("1487")
631
    self.assertEqual(1487, self.client.ShutdownInstance("foo-instance",
622 632
                                                        dry_run=True))
623 633
    self.assertHandler(rlib2.R_2_instances_name_shutdown)
624 634
    self.assertItems(["foo-instance"])
625 635
    self.assertDryRun()
636
    self.assertQuery("reason", None)
626 637

  
627 638
  def testStartupInstance(self):
628 639
    self.rapi.AddResponse("27149")

Also available in: Unified diff