refactor: raise error on auth failure and clean up meeks-ai fallback

This commit is contained in:
Michael Ingvarsson
2026-07-16 12:33:57 +02:00
parent b47a3b3146
commit c5dd178fd6
6 changed files with 95 additions and 41 deletions
+11
View File
@@ -122,3 +122,14 @@ def test_gitea_client_list_unread_notifications() -> None:
assert kwargs.get("params") == {"all": "false", "since": "2026-06-30T21:41:16+02:00"}
import pytest
def test_gitea_client_get_authenticated_user_failure() -> None:
client: GiteaClient = GiteaClient()
with patch("httpx.Client.get") as mock_get:
mock_get.side_effect = Exception("Connection error")
with pytest.raises(RuntimeError, match="Could not get authenticated user"):
client.get_authenticated_user()