def test_parseAllVolumeSnapshotList(self): with open("glusterSnapshotList.xml") as f: out = f.read() tree = etree.fromstring(out) gcli._TIME_ZONE = "IST" status = gcli._parseAllVolumeSnapshotList(tree) self.assertEquals(status, glusterTestData.GLUSTER_ALL_VOLUME_SNAPSHOT_LIST)
def test_parseAllVolumeSnapshotListEmpty(self): with open("glusterSnapshotListEmpty.xml") as f: out = f.read() tree = etree.fromstring(out) gcli._TIME_ZONE = "IST" status = gcli._parseAllVolumeSnapshotList(tree) expected = {} self.assertEquals(status, expected)