Skip to content

Commit 66b020a

Browse files
committed
fix(test): minor issue with invalid username
1 parent c07871a commit 66b020a

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

tests/mock_data/api-error.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/mock_data/invalidusername.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

tests/mock_data/invalidusername.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,37 @@
1212
"id": "1PgHW1XZSgWteDhyTiIFbgAAgcnlmYnB0ZWpiAXxms2FCAXxms17GAAAAAA",
1313
"media": {
1414
"type": "VIDEO",
15-
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4",
16-
"mediaStreamingUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4",
17-
"mediaPreviewUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
15+
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4",
16+
"mediaStreamingUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4",
17+
"mediaPreviewUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
1818
},
1919
"overlayImage": {
20-
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4",
21-
"mediaStreamingUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
20+
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4",
21+
"mediaStreamingUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
2222
},
2323
"captureTimeSecs": "1633810603"
2424
},
2525
{
2626
"id": "1PgHW1XZSgWteDhyTiIFbgAAgZWZqZ2t2ZGN4AXxpJwZoAXxpJwRfAAAAAA",
2727
"media": {
2828
"type": "IMAGE",
29-
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
29+
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
3030
},
3131
"captureTimeSecs": "1633851737"
3232
},
3333
{
3434
"id": "1PgHW1XZSgWteDhyTiIFbgAAgdGlyeXpodGx4AXxpR4jsAXxpR4XzAAAAAA",
3535
"media": {
3636
"type": "IMAGE",
37-
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
37+
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
3838
},
3939
"captureTimeSecs": "1633853867"
4040
},
4141
{
4242
"id": "1PgHW1XZSgWteDhyTiIFbgAAgdnJlc2hjeWd5AXxqhQjjAXxqhQaeAAAAAA",
4343
"media": {
4444
"type": "IMAGE",
45-
"mediaUrl": "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
45+
"mediaUrl": "https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
4646
},
4747
"captureTimeSecs": "1633874675"
4848
}

tests/test_downlaoder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Tests for `snapchat_dl` package."""
2+
23
import os
34
import shutil
45
import unittest
@@ -17,7 +18,9 @@ class Test_downloader(unittest.TestCase):
1718

1819
def setUp(self):
1920
"""Set up test fixtures."""
20-
self.test_url = "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
21+
self.test_url = (
22+
"https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
23+
)
2124
self.test_url404 = "https://google.com/error.html"
2225

2326
def test_download_url(self):

tests/test_snapchat_dl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def setUp(self):
2727
directory_prefix=".test-data",
2828
dump_json=True,
2929
)
30-
self.test_url = "https://filesamples.com/samples/video/mp4/sample_640x360.mp4"
30+
self.test_url = (
31+
"https://sample-videos.com/video321/mp4/240/big_buck_bunny_240p_1mb.mp4"
32+
)
3133
self.test_url404 = "https://google.com/error.html"
3234
self.username = "invalidusername"
3335
self.html = open(

0 commit comments

Comments
 (0)