def test_extract_hts_strings_with_hts(self): """ Verify that extract_hts correctly returns the hashtags in the string in the order in which they occur. """ self.assertEqual( ParseTools.extract_hts("String with a few #Hash #Tags"), ["#Hash", "#Tags"]) self.assertEqual( ParseTools.extract_hts("String with a #Hashtags in weird #Places"), ["#Hashtags", "#Places"])
def test_extract_hts_strings_without_hts(self): """ Verify that extract_hts correctly indicates that no hashtags exist in a string. """ self.assertEqual(ParseTools.extract_hts("String with no hastags"), [])