add tests for attribute()