Revision 06c2fb4a test/py/ganeti.rapi.client_unittest.py

b/test/py/ganeti.rapi.client_unittest.py
1267 1267
    self.assertEqual(serializer.LoadJson(self.rapi.GetLastRequestData()),
1268 1268
                     { "os_name": "linux", })
1269 1269

  
1270
  def testSnapshotInstance(self):
1271
    self.rapi.AddResponse("23681")
1272
    snap = [0, {"snapshot_name": "snap1"}]
1273
    job_id = self.client.SnapshotInstance("inst7210", disks=[snap])
1274
    self.assertEqual(job_id, 23681)
1275
    self.assertItems(["inst7210"])
1276
    self.assertHandler(rlib2.R_2_instances_name_snapshot)
1277
    self.assertEqual(serializer.LoadJson(self.rapi.GetLastRequestData()),
1278
                     {"disks": [snap]})
1279

  
1270 1280
  def testModifyCluster(self):
1271 1281
    for mnh in [None, False, True]:
1272 1282
      self.rapi.AddResponse("14470")

Also available in: Unified diff