-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf20f32
commit 161395b
Showing
3 changed files
with
77 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.idea | ||
venv | ||
__pycache__ | ||
/*.bnd | ||
/*.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from yt2flp import * | ||
|
||
def test_startup(): | ||
assert startup_and_options(True) == {"boost": True, "debug": True, "name": "output"} | ||
|
||
|
||
|
||
class TestUrls: | ||
def test_valid_url(self): | ||
assert stripurl("https://www.youtube.com/watch?v=EIyixC9NsLI&si=ksjrhgksjrbg") == "https://youtu.be/EIyixC9NsLI" | ||
|
||
def test_random_url(self): | ||
import secrets | ||
urldata = secrets.token_hex(15) | ||
assert stripurl(f"https://www.youtube.com/watch?v={urldata}&si={secrets.token_hex(10)}") == f"https://youtu.be/{urldata}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters