fix test_macro_embed by stripping trailing ) and mocking the url fetch