Fixed test for AttributeError