def test_parseVolumeSnapshotList(self): with open("glusterVolumeSnapshotList.xml") as f: out = f.read() tree = etree.fromstring(out) gcli._TIME_ZONE = "IST" status = gcli._parseVolumeSnapshotList(tree) self.assertEquals(status, glusterTestData.GLUSTER_VOLUME_SNAPSHOT_LIST)
def test_parseVolumeSnapshotListEmpty(self): with open("glusterVolumeSnapshotListEmpty.xml") as f: out = f.read() tree = etree.fromstring(out) gcli._TIME_ZONE = "IST" status = gcli._parseVolumeSnapshotList(tree) expected = {} self.assertEquals(status, expected)