mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Downloader] Fix URL parsing for non-GitHub/GitLab links (#2123)
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
parent
54baf687ec
commit
08fc732b7b
@ -118,3 +118,19 @@ def test_tree_url_parse(repo_manager):
|
|||||||
|
|
||||||
for test_case in cases:
|
for test_case in cases:
|
||||||
assert test_case["expected"] == repo_manager._parse_url(*test_case["input"])
|
assert test_case["expected"] == repo_manager._parse_url(*test_case["input"])
|
||||||
|
|
||||||
|
|
||||||
|
def test_tree_url_non_github(repo_manager):
|
||||||
|
cases = [
|
||||||
|
{
|
||||||
|
"input": ("https://gitlab.com/Tobotimus/Tobo-Cogs", None),
|
||||||
|
"expected": ("https://gitlab.com/Tobotimus/Tobo-Cogs", None),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"input": ("https://my.usgs.gov/bitbucket/scm/Tobotimus/Tobo-Cogs", "V3"),
|
||||||
|
"expected": ("https://my.usgs.gov/bitbucket/scm/Tobotimus/Tobo-Cogs", "V3"),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
for test_case in cases:
|
||||||
|
assert test_case["expected"] == repo_manager._parse_url(*test_case["input"])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user