Fix graph tests
Make not implemented errors a bit more Pythonic