Add a test for converting attribute values to str