Tests on attribute api routes
And fixes for these