Test for extract_tags function