Exemple #1
0
 def test_name_present(self):
     mentions = bot.get_vendors_mentioned("like What-Cha like",
                                          self.vendors)
     self.assertTrue(mentions)
Exemple #2
0
 def test_multiple_mentions(self):
     t = "like WhatCha or Yunnan Sourcing or Yunomi?"
     mentions = bot.get_vendors_mentioned(t, self.vendors)
     self.assertTrue(len(mentions) == 3)
Exemple #3
0
 def test_duplicate_mentions(self):
     t = "like WhatCha or whatcha or what-cha or what-cha.com?"
     mentions = bot.get_vendors_mentioned(t, self.vendors)
     self.assertTrue(len(mentions) == 1)
Exemple #4
0
 def test_nickname_present_punctuation(self):
     mentions = bot.get_vendors_mentioned("like whatCHA's like",
                                          self.vendors)
     self.assertTrue(mentions)
Exemple #5
0
 def test_url_present(self):
     mentions = bot.get_vendors_mentioned(
         "like https://yunnanSourcing.com like", self.vendors)
     self.assertTrue(mentions)
Exemple #6
0
 def test_username_not_present(self):
     mentions = bot.get_vendors_mentioned("like /u/yunnanSourcin like",
                                          self.vendors)
     self.assertFalse(mentions)
Exemple #7
0
 def test_exact_name_not_present_yunnan_sourcing(self):
     mentions = bot.get_vendors_mentioned("like yunnan-sourcing like",
                                          self.vendors)
     self.assertFalse(mentions)
Exemple #8
0
 def test_name_present_yunnan_sourcing(self):
     mentions = bot.get_vendors_mentioned("like yunnan sourcing like",
                                          self.vendors)
     self.assertTrue(mentions)