Make graph tests handle missing env variables more gracefully