Esempio n. 1
0
    def test_german_hard(self):
        lan = LanguageRule().de
        d = FleschKincaidDifficultyEstimator.estimate_difficulty(DE_HARD_TEXT, lan, self.user)

        self.assertEqual('HARD', d['discrete'])
Esempio n. 2
0
    def test_english_hard(self):
        lan = LanguageRule().en
        d = FleschKincaidDifficultyEstimator.estimate_difficulty(E_HARD_TEXT, lan, self.user)

        self.assertEqual(d['discrete'], 'HARD')
Esempio n. 3
0
    def test_german_medium(self):
        lan = LanguageRule().de
        d = FleschKincaidDifficultyEstimator.estimate_difficulty(DE_MEDIUM_TEXT, lan, self.user)

        self.assertEqual('MEDIUM', d['discrete'])
Esempio n. 4
0
    def test_english_medium(self):
        lan = LanguageRule().en
        d = FleschKincaidDifficultyEstimator.estimate_difficulty(E_MEDIUM_TEXT, lan, self.user)

        self.assertEqual(d['discrete'], 'MEDIUM')