diff --git a/tests/test_upload_integration.py b/tests/test_upload_integration.py index 24340ea..3374861 100644 --- a/tests/test_upload_integration.py +++ b/tests/test_upload_integration.py @@ -196,7 +196,7 @@ class TestTikTokUploadIntegration: url = uploader.upload(m) assert url is not None - assert "tiktok.com" in url + assert url.startswith("https://www.tiktok.com/") # =================================================================== @@ -254,4 +254,4 @@ class TestFacebookUploadIntegration: url = uploader.upload(m) assert url is not None - assert "facebook.com" in url + assert url.startswith("https://www.facebook.com/") diff --git a/tests/test_videos.py b/tests/test_videos.py index 7136185..c580a40 100644 --- a/tests/test_videos.py +++ b/tests/test_videos.py @@ -67,5 +67,5 @@ class TestSaveData: with patch("builtins.open", m): save_data("test_channel", "output2.mp4", "Another Title", "thread_123", "gta") - # Should not write anything since ID exists - assert not m().write.called or m().seek.called is False + # Verify no new data was written (duplicate ID skipped) + assert not m().write.called diff --git a/tests/test_voice.py b/tests/test_voice.py index 77eafa6..46dafcb 100644 --- a/tests/test_voice.py +++ b/tests/test_voice.py @@ -43,12 +43,9 @@ class TestSanitizeText: text = "1+1 equals 2" result = sanitize_text(text) - # The + is replaced by "plus" via str.replace before regex strips it - # However, the regex removes standalone + first. - # The replacement text.replace("+", "plus") runs after regex. - # So "1+1" → regex removes "+" → "1 1" → replace doesn't find "+" → "1 1" - # But text.replace runs on the result, so let's check actual behavior. + # Verify numeric content is preserved after sanitization assert "1" in result + assert "equals" in result def test_removes_extra_whitespace(self): from utils.voice import sanitize_text