Fix fallback dependency detection

This commit is contained in:
Dymas
2026-07-19 14:40:03 +02:00
parent 02226ad5c9
commit 348d97488a
7 changed files with 46 additions and 5 deletions
+20
View File
@@ -3119,6 +3119,26 @@ class HandlerRouteTests(unittest.TestCase):
self.assertIn("anipy-cli", handler.json_payload)
self.assertIn("animdl", handler.json_payload)
def test_dependency_status_checks_docker_fallback_tool_paths(self):
with mock.patch.object(http_handler, "cli_executable_exists", return_value=True), mock.patch.object(
http_handler, "cli_executable_exists_any", return_value=True
) as exists_any:
status = http_handler.dependency_status()
self.assertTrue(status["animdl"])
exists_any.assert_any_call(
http_handler.ANIMDL,
"animdl",
"/usr/local/bin/animdl",
"/usr/bin/animdl",
)
exists_any.assert_any_call(
http_handler.ANIPY_CLI,
"anipy-cli",
"/usr/local/bin/anipy-cli",
"/usr/bin/anipy-cli",
)
def test_clear_failed_route_removes_failed_jobs(self):
with APP.DOWNLOAD_QUEUE._connect() as conn:
conn.execute("DELETE FROM jobs")