From 73d92e3f53fc144ea92f341faecbbf1af821eb46 Mon Sep 17 00:00:00 2001 From: Chris Fulljames Date: Sun, 23 Feb 2025 10:02:14 -0500 Subject: [PATCH] Fix broken tests --- test/test_offline.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_offline.py b/test/test_offline.py index 9d9389b..2260fb0 100644 --- a/test/test_offline.py +++ b/test/test_offline.py @@ -235,7 +235,7 @@ def test_get_pfp_invalid_user(client): # Upload Song ################################################################################ -def _test_upload_song(client, msg, error=False, songid=None, user="user", filename="sample-3s.mp3", **kwargs): +def _test_upload_song(client, msg, error=False, songid=None, user="user", userid=1, filename="sample-3s.mp3", **kwargs): song_file = open(filename, "rb") data = { @@ -256,6 +256,8 @@ def _test_upload_song(client, msg, error=False, songid=None, user="user", filena assert response.status_code == 302 if error: assert response.headers["Location"] == "None" + elif songid: + assert response.headers["Location"] == f"/song/{userid}/{songid}?action=view" else: assert response.headers["Location"] == f"/users/{user}" -- 2.39.5