コード例 #1
0
	def test_who_fluency(self, mock_tokenize) :
		testarray = []
		testarray.append('that student is the one who studies computer science')
		ask.removeQuestions(testarray)
		self.assertTrue(not mock_tokenize.called)
コード例 #2
0
	def test_keep_question(self):
		testarray = []
		testarray.append('that student studies computer science')
		ask.removeQuestions(testarray)
		self.assertTrue(len(testarray) == 1)
コード例 #3
0
	def test_remove_who(self):
		testarray = []
		testarray.append('that student is the one who studies computer science')
		ask.removeQuestions(testarray)
		self.assertTrue(len(testarray) == 0)
コード例 #4
0
	def test_remove_over(self, mock_getFluency) :
		testarray = []
		testarray.append('one two three four five six seven eight nine ten eleven')
		ask.removeQuestions(testarray)
		mock_getFluency.assert_called()
コード例 #5
0
	def test_remove_equal(self, mock_getFluency) :
		testarray = []
		testarray.append('one two three four five six seven eight nine ten')
		ask.removeQuestions(testarray)
		assert not mock_getFluency.called, 'Get fluency was called even though '
コード例 #6
0
	def test_remove_under(self, mock_getFluency) :
		testarray = []
		testarray.append('one two three four five')
		ask.removeQuestions(testarray)
		mock_getFluency.assert_called()