def test_question_score(self, mock_distance): mock_distance.return_value = 20 mock = MagicMock() with mock as answer: evaluate.question_score('this is a sentence with some words and, if I may say so, an interesting structure so the tagger should work.') mock_distance.assert_called()
def getfluency(q): a = evaluate.question_score(q) return a
def test_question_score_tag(self, mock_tag): evaluate.question_score('this is a sentence with some words and, if I may say so, an interesting structure so the tagger should work.') mock_tag.assert_called()