mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-05-10 06:13:54 +00:00
fix: catch update notification exceptions (#1278)
* feat: add test for failing GitHub API call. * fix: don't raise exceptions in get_most_recent_release_version. * style: apply ruff. * That not should not have been there.
This commit is contained in:
14
tests/qt/test_about_modal.py
Normal file
14
tests/qt/test_about_modal.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from pytestqt.qtbot import QtBot
|
||||
|
||||
from tagstudio.qt.mixed.about_modal import AboutModal
|
||||
|
||||
|
||||
def test_github_api_unavailable(qtbot: QtBot, mocker) -> None:
|
||||
mocker.patch(
|
||||
"requests.get",
|
||||
side_effect=ConnectionError(
|
||||
"Failed to resolve 'api.github.com' ([Errno -3] Temporary failure in name resolution)"
|
||||
),
|
||||
)
|
||||
modal = AboutModal("/tmp")
|
||||
qtbot.addWidget(modal)
|
||||
Reference in New Issue
Block a user