def test_collect_highlights_diff(self): highlights = Highlights() highlights.add_pattern('First', '#highlights test') remaining_user = list( filter(lambda user: not highlights.get(user), AdminRetriever(self.updater, 1).admin_member)) self.assertEqual(1, len(remaining_user)) self.assertEqual('Second', remaining_user[0])
def test_hash_and_colon(self): highlights = Highlights() self.assertTrue(highlights.add_pattern('Chris', HASH_AND_COLON)) self.assertEqual('test', highlights.get('Chris'))
def test_hash_multiple(self): highlights = Highlights() self.assertTrue(highlights.add_pattern('Chris', BOTH_HASH)) self.assertEqual('test', highlights.get('Chris'))
def test_hash_back(self): highlights = Highlights() self.assertTrue(highlights.add_pattern('Chris', BACK_HASH)) self.assertEqual('test', highlights.get('Chris'))
def test_hash_front(self): highlights = Highlights() self.assertTrue(highlights.add_pattern('Chris', FRONT_HASH)) self.assertEqual('test', highlights.get('Chris'))