Add highlight search to search_code function (#925)

*  add highlight search to search_code function

*  add highlighting search code tests
This commit is contained in:
h.shi
2018-10-10 16:38:47 +08:00
committed by Wan Liuyang
parent c13b43ea9c
commit 1fa25670f7
6 changed files with 39 additions and 3 deletions
File diff suppressed because one or more lines are too long
+4
View File
@@ -78,6 +78,10 @@ class Search(Framework.TestCase):
else:
self.assertEqual(files[0].decoded_content[:30], "https\nGET\napi.github.com\nNone\n")
def testSearchHighlightingCode(self):
files = self.g.search_code("toto", sort="indexed", order="asc", user="jacquev6", highlight=True)
self.assertTrue(files[0].text_matches)
def testUrlquotingOfQualifiers(self):
# Example taken from #236
issues = self.g.search_issues("repo:saltstack/salt-api type:Issues", updated=">2014-03-04T18:28:11Z")