def test_filenameMismatch(self):
        fn = self.makeZipFile(["test contents",
                               "more contents"])
        zf = zipfile.ZipFile(fn, "r")
        info = zf.getinfo("0")
        info.filename = "not zero"
        zf.close()
        scribble = file(fn, "r+b")
        scribble.seek(info.header_offset, 0)
        scribble.write(info.FileHeader())
        scribble.close()

        czf = zipstream.ChunkingZipFile(fn)
        self.assertRaises(zipfile.BadZipfile, czf.readfile, "0")
        self.assertEqual(czf.readfile("1").read(), "more contents")
A zipfile entry with a different filename than is found in the central
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/test/test_zipstream.py/ZipstreamTest.test_filenameMismatch