def METHOD_NAME(testrepo):
    blob_oid = testrepo.create_blob(BLOB_NEW_CONTENT)
    blob = testrepo[blob_oid]
    assert isinstance(blob, pygit2.Blob)
    assert pygit2.GIT_OBJ_BLOB == blob.type
    assert blob_oid == blob.id
    assert utils.gen_blob_sha1(BLOB_NEW_CONTENT) == blob_oid.hex
    assert BLOB_NEW_CONTENT == blob.data
    assert len(BLOB_NEW_CONTENT) == blob.size
    assert BLOB_NEW_CONTENT == blob.read_raw()
    blob_buffer = memoryview(blob)
    assert len(BLOB_NEW_CONTENT) == len(blob_buffer)
    assert BLOB_NEW_CONTENT == blob_buffer
    def set_content():
        blob_buffer[:2] = b'hi'
    with pytest.raises(TypeError): set_content()