Add tests for getattr