use regular expression in unittest