[tests] Fix doctests so that they are all passing