예제 #1
0
 def test_get_most_common_words(self):
     obj = WordCounter()
     obj.text_content = self.content
     self.assertEqual(obj.get_most_common_words(2), [('Four', 4),
                                                     ('Three', 3)])
예제 #2
0
 def test_get_total_words(self):
     obj = WordCounter()
     obj.text_content = self.content
     self.assertEqual(obj.get_total_words(), 10)