Skip to content

Commit 5804d2f

Browse files
committed
attempt to debug add history test
1 parent b182f50 commit 5804d2f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/conftest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,10 @@ def fixture_get_playlist_with_dupes(yt_oauth: YTMusic, sample_song_list_dupes):
333333

334334
@pytest.fixture(name="add_history_items")
335335
def fixture_add_history_items(yt_oauth: YTMusic, sample_long_song_list):
336-
timestamp = yt_oauth.get_signatureTimestamp()
337336
num_songs_added = 0
337+
print(f"total songs to be added to history: {len(sample_long_song_list)}")
338338
for song in sample_long_song_list:
339-
song = yt_oauth.get_song(song, timestamp)
339+
song = yt_oauth.get_song(song, yt_oauth.get_signatureTimestamp())
340340
try:
341341
response = yt_oauth.add_history_item(song)
342342
response.raise_for_status()
@@ -345,4 +345,6 @@ def fixture_add_history_items(yt_oauth: YTMusic, sample_long_song_list):
345345
continue
346346
assert response.status_code == 204
347347
num_songs_added += 1
348+
print(f"total songs added to history so far: {num_songs_added}")
349+
print(f"{num_songs_added} were added to history successfully")
348350
return num_songs_added

0 commit comments

Comments
 (0)