remove redundant has_attr check in tests.