Added unit testing for attr_fn_c