Skip to content

Commit

Permalink
Merge pull request #23 from skyme5/SDL-1
Browse files Browse the repository at this point in the history
fix(test): minor issue with invalid username
  • Loading branch information
skyme5 authored Jul 10, 2024
2 parents c68096f + 66b020a commit b17a07e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/mock_data/api-error.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/mock_data/invalidusername.html

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions tests/mock_data/invalidusername.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,37 @@
"id": "1PgHW1XZSgWteDhyTiIFbgAAgcnlmYnB0ZWpiAXxms2FCAXxms17GAAAAAA",
"media": {
"type": "VIDEO",
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4",
"mediaStreamingUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4",
"mediaPreviewUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4",
"mediaStreamingUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4",
"mediaPreviewUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
},
"overlayImage": {
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4",
"mediaStreamingUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4",
"mediaStreamingUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
},
"captureTimeSecs": "1633810603"
},
{
"id": "1PgHW1XZSgWteDhyTiIFbgAAgZWZqZ2t2ZGN4AXxpJwZoAXxpJwRfAAAAAA",
"media": {
"type": "IMAGE",
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
},
"captureTimeSecs": "1633851737"
},
{
"id": "1PgHW1XZSgWteDhyTiIFbgAAgdGlyeXpodGx4AXxpR4jsAXxpR4XzAAAAAA",
"media": {
"type": "IMAGE",
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
},
"captureTimeSecs": "1633853867"
},
{
"id": "1PgHW1XZSgWteDhyTiIFbgAAgdnJlc2hjeWd5AXxqhQjjAXxqhQaeAAAAAA",
"media": {
"type": "IMAGE",
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
},
"captureTimeSecs": "1633874675"
}
Expand Down
5 changes: 4 additions & 1 deletion tests/test_downlaoder.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for `snapchat_dl` package."""

import os
import shutil
import unittest
Expand All @@ -17,7 +18,9 @@ class Test_downloader(unittest.TestCase):

def setUp(self):
"""Set up test fixtures."""
self.test_url = "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
self.test_url = (
"https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
)
self.test_url404 = "https://google.com/error.html"

def test_download_url(self):
Expand Down
4 changes: 3 additions & 1 deletion tests/test_snapchat_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def setUp(self):
directory_prefix=".test-data",
dump_json=True,
)
self.test_url = "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
self.test_url = (
"https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
)
self.test_url404 = "https://google.com/error.html"
self.username = "invalidusername"
self.html = open(
Expand Down

0 comments on commit b17a07e

Please sign in to comment.