fix tests of graph code