def test_get_matching_country_BLOCK_LETTERS(self):
     matching_country = covid_trend.get_matching_country("BURKINA FASO")
     self.assertEqual("burkina-faso", matching_country)
 def test_get_matching_country_partial_match(self):
     matching_country = covid_trend.get_matching_country("trend united")
     self.assertEqual(None, matching_country)
 def test_get_matching_country_multiple_match_iso2(self):
     matching_country = covid_trend.get_matching_country("IN BE")
     self.assertEqual("belgium", matching_country)
 def test_get_matching_country_hit_iso2_at_start_of_tweet(self):
     matching_country = covid_trend.get_matching_country("BE trend")
     self.assertEqual("belgium", matching_country)
 def test_get_matching_country_no_hit(self):
     matching_country = covid_trend.get_matching_country("BEtrend XYZ")
     self.assertEqual(None, matching_country)
 def test_get_matching_country_hit_country_full_string_match(self):
     matching_country = covid_trend.get_matching_country("Burkina Faso")
     self.assertEqual("burkina-faso", matching_country)
 def test_get_matching_country_hit_iso2_not_as_word(self):
     matching_country = covid_trend.get_matching_country("getBE trend")
     self.assertEqual(None, matching_country)
 def test_get_matching_country_hit_iso2_only_word_in_tweet(self):
     matching_country = covid_trend.get_matching_country("BE")
     self.assertEqual("belgium", matching_country)
 def test_get_matching_country_hit_iso2_small_letter(self):
     matching_country = covid_trend.get_matching_country("be")
     self.assertEqual("belgium", matching_country)
 def test_get_matching_country_hit_slug_not_as_word_in_tweet(self):
     matching_country = covid_trend.get_matching_country("get moldovadata.")
     self.assertEqual("moldova", matching_country)
 def test_get_matching_country_hit_slug_end_of_tweet(self):
     matching_country = covid_trend.get_matching_country(
         "get trend moldova")
     self.assertEqual("moldova", matching_country)
 def test_get_matching_country_hit_slug_full_string_match(self):
     matching_country = covid_trend.get_matching_country("moldova")
     self.assertEqual("moldova", matching_country)
 def test_get_matching_country_hit_country_at_end_of_tweet(self):
     matching_country = covid_trend.get_matching_country("get Burkina Faso")
     self.assertEqual("burkina-faso", matching_country)
 def test_get_matching_country_hit_country_not_as_word_in_tweet(self):
     matching_country = covid_trend.get_matching_country(
         "getBurkina Fasodetails.")
     self.assertEqual("burkina-faso", matching_country)
 def test_get_matching_country_camel_case(self):
     matching_country = covid_trend.get_matching_country("BuRkInA fAsO")
     self.assertEqual("burkina-faso", matching_country)
 def test_get_matching_country_hit_iso2_as_word(self):
     matching_country = covid_trend.get_matching_country("get be trend")
     self.assertEqual("belgium", matching_country)
 def test_get_random_country_COUNTRIES_not_loaded(self):
     covid_trend.COUNTRIES = None
     covid_trend.get_matching_country("sample tweet")
     self.assertIsNot(0, len(covid_trend.COUNTRIES))
 def test_get_matching_country_countries_already_loaded(self):
     countries = [{"Country": "Germany", "Slug": "germany", "ISO2": "DE"}]
     covid_trend.COUNTRIES = countries
     covid_trend.get_matching_country("sample tweet")
     self.assertEqual(1, len(covid_trend.COUNTRIES))