Revision 591e5103 test/ganeti.rapi.client_unittest.py

b/test/ganeti.rapi.client_unittest.py
233 233
    self.assertHandler(rlib2.R_2_instances)
234 234
    self.assertBulk()
235 235

  
236
  def testGetInstanceInfo(self):
236
  def testGetInstance(self):
237 237
    self.rapi.AddResponse("[]")
238
    self.assertEqual([], self.client.GetInstanceInfo("instance"))
238
    self.assertEqual([], self.client.GetInstance("instance"))
239 239
    self.assertHandler(rlib2.R_2_instances_name)
240 240
    self.assertItems(["instance"])
241 241

  
242
  def testGetInstanceInfo(self):
243
    self.rapi.AddResponse("21291")
244
    self.assertEqual(21291, self.client.GetInstanceInfo("inst3"))
245
    self.assertHandler(rlib2.R_2_instances_name_info)
246
    self.assertItems(["inst3"])
247
    self.assertQuery("static", None)
248

  
249
    self.rapi.AddResponse("3428")
250
    self.assertEqual(3428, self.client.GetInstanceInfo("inst31", static=False))
251
    self.assertHandler(rlib2.R_2_instances_name_info)
252
    self.assertItems(["inst31"])
253
    self.assertQuery("static", ["0"])
254

  
255
    self.rapi.AddResponse("15665")
256
    self.assertEqual(15665, self.client.GetInstanceInfo("inst32", static=True))
257
    self.assertHandler(rlib2.R_2_instances_name_info)
258
    self.assertItems(["inst32"])
259
    self.assertQuery("static", ["1"])
260

  
242 261
  def testCreateInstanceOldVersion(self):
243 262
    self.rapi.AddResponse(serializer.DumpJson([]))
244 263
    self.assertRaises(NotImplementedError, self.client.CreateInstance,
......
424 443
    self.assertHandler(rlib2.R_2_nodes)
425 444
    self.assertBulk()
426 445

  
427
  def testGetNodeInfo(self):
446
  def testGetNode(self):
428 447
    self.rapi.AddResponse("{}")
429
    self.assertEqual({}, self.client.GetNodeInfo("node-foo"))
448
    self.assertEqual({}, self.client.GetNode("node-foo"))
430 449
    self.assertHandler(rlib2.R_2_nodes_name)
431 450
    self.assertItems(["node-foo"])
432 451

  

Also available in: Unified diff