tests: Use introspection for attributes
Now that we have introspection helpers for attributes, we can use them ourselves to make this code less brittle.
Now that we have introspection helpers for attributes, we can use them ourselves to make this code less brittle.