Fix fallback dependency detection
This commit is contained in:
+20
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user