def _write_content(self, suffix):
    try:
        (fh, fn) = tempfile.mkstemp(suffix)
        with tools.open_archive(fn, 'wb') as f:
            f.write(self.original_content)
        with tools.open_archive(fn, 'rb') as f:
            self.assertEqual(f.read(), self.original_content)
        with open(fn, 'rb') as f:
            return f.read()
    finally:
        os.close(fh)
        os.remove(fn)
def _write_content(self, suffix):
    try:
        (fh, fn) = tempfile.mkstemp(suffix)
        with tools.open_archive(fn, 'wb') as f:
            f.write(self.original_content)
        with tools.open_archive(fn, 'rb') as f:
            self.assertEqual(f.read(), self.original_content)
        with open(fn, 'rb') as f:
            return f.read()
    finally:
        os.close(fh)
        os.remove(fn)