(self)
Get content as utf8-encoded bytes

        NOTE: This method is only used in tests.
        Cannot be called more than once, and `self.as_file()` will
        return a closed file after this is called.
Get content as utf8-encoded bytes
Get content as utf8 - encoded bytes
def as_string(self):
        """Get content as utf8-encoded bytes

        NOTE: This method is only used in tests.
        Cannot be called more than once, and `self.as_file()` will
        return a closed file after this is called.
        """
        with self.fileobj:
            return self.fileobj.read()
def as_string ( self ) : with self . fileobj : return self . fileobj . read ( )