def METHOD_NAME(self):
    with tempfile.NamedTemporaryFile() as f:
        f.write(b"x" * 11)
        f.seek(0)
        compress_stream = mod.GzipStream(f)
        # Try to read content_length without reading the stream
        with self.assertRaises(GzipStreamError):
            compress_stream.content_length  # noqa
        # Try to read content_length after partially reading the stream
        content_length = len(compress_stream.read(5))
        with self.assertRaises(GzipStreamError):
            compress_stream.content_length  # noqa
        # Read content_length after completely reading the stream and check
        # that it's correct
        content_length += len(compress_stream.read())
        self.assertNotEqual(compress_stream.content_length, content_length)
        self.assertEqual(compress_stream.content_length, 11)