From c7d7adc36003d8f72586eab607f4b783cd59f801 Mon Sep 17 00:00:00 2001 From: Tiara Rodney Date: Sat, 6 Jun 2026 16:15:13 +0200 Subject: [PATCH] test: assert parse_base_url returns str --- tests/unit/byteb4rb1e/utils/vcs/test_git.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/unit/byteb4rb1e/utils/vcs/test_git.py b/tests/unit/byteb4rb1e/utils/vcs/test_git.py index c56015d..e60a78e 100644 --- a/tests/unit/byteb4rb1e/utils/vcs/test_git.py +++ b/tests/unit/byteb4rb1e/utils/vcs/test_git.py @@ -9,17 +9,21 @@ class TestParseBaseUrl: def test_bitbucket(self) -> None: result = parse_base_url("git@bitbucket.org:byteb4rb1e/foo.git") - assert str(result) == "byteb4rb1e" + assert result == "byteb4rb1e" def test_forgejo_host(self) -> None: result = parse_base_url( "git@git.code.tiararodney.com:h5p-mirror/foo.git" ) - assert str(result) == "h5p-mirror" + assert result == "h5p-mirror" def test_github_host(self) -> None: result = parse_base_url("git@github.com:h5p/h5p-multi-choice.git") - assert str(result) == "h5p" + assert result == "h5p" + + def test_returns_str(self) -> None: + result = parse_base_url("git@bitbucket.org:byteb4rb1e/foo.git") + assert isinstance(result, str) def test_rejects_https_url(self) -> None: with pytest.raises(ValueError):