Update test_global_search.py

added 2 test cases
This commit is contained in:
Fisher Yu 2018-07-19 22:01:31 +08:00 committed by GitHub
parent 7b89d3ee46
commit 0cbe649762
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,8 +50,12 @@ class TestGlobalSearch(unittest.TestCase):
self.assertTrue('After Mulder awakens from his coma, he realizes his duty to prevent alien colonization. ' in results[0].content)
results = global_search.search('extraterrestrial')
self.assertTrue('Carter explored themes of extraterrestrial involvement in ancient mass extinctions in this episode, the third in a trilogy.' in results[0].content)
self.assertTrue('Carter explored themes of extraterrestrial involvement in ancient mass extinctions in this episode, the third in a trilogy.' in results[0].content)
results = global_search.search('awakens & duty & alien')
self.assertTrue('After Mulder awakens from his coma, he realizes his duty to prevent alien colonization. ' in results[0].content)
results = global_search.search('awakens & duty & otherterm')
self.assertTrue(!results[0].content)
def test_update_doc(self):
self.insert_test_events()
test_subject = 'testing global search'