def test_german_hard(self): lan = LanguageRule().de d = FleschKincaidDifficultyEstimator.estimate_difficulty(DE_HARD_TEXT, lan, self.user) self.assertEqual('HARD', d['discrete'])
def test_english_hard(self): lan = LanguageRule().en d = FleschKincaidDifficultyEstimator.estimate_difficulty(E_HARD_TEXT, lan, self.user) self.assertEqual(d['discrete'], 'HARD')
def test_german_medium(self): lan = LanguageRule().de d = FleschKincaidDifficultyEstimator.estimate_difficulty(DE_MEDIUM_TEXT, lan, self.user) self.assertEqual('MEDIUM', d['discrete'])
def test_english_medium(self): lan = LanguageRule().en d = FleschKincaidDifficultyEstimator.estimate_difficulty(E_MEDIUM_TEXT, lan, self.user) self.assertEqual(d['discrete'], 'MEDIUM')