Search issue 494 (#495)
* search_suggestions: fix handle history when authenticated * search_suggestions: test historical option does something * remove optional param --------- Co-authored-by: sigma67 <ytmusicapi@gmail.com>
This commit is contained in:
parent
1fd93dcfb6
commit
1971121add
2 changed files with 16 additions and 2 deletions
|
|
@ -322,6 +322,15 @@ class TestYTMusic(unittest.TestCase):
|
|||
result = self.yt.get_search_suggestions("fade", detailed_runs=True)
|
||||
self.assertGreaterEqual(len(result), 0)
|
||||
|
||||
# add search term to history
|
||||
first_pass = self.yt_auth.search("b")
|
||||
self.assertGreater(len(first_pass), 0)
|
||||
# get results
|
||||
results = self.yt_auth.get_search_suggestions("b", detailed_runs=True)
|
||||
self.assertGreater(len(results), 0)
|
||||
self.assertTrue(any(item["fromHistory"] for item in results))
|
||||
self.assertTrue(any(not item["fromHistory"] for item in results))
|
||||
|
||||
################
|
||||
# EXPLORE
|
||||
################
|
||||
|
|
|
|||
Loading…
Reference in a new issue