fix: take the Agent's empty answer for an uninstalled game as gone

Once Blizzard's Agent has removed a game it answers GET /game/<uid> with
an empty object, not installed false, so a finished uninstall read as a
failure and opened Battle.net.
This commit is contained in:
maxjivi05 authored and MaxsTechReview committed 2026-10-26 09:01:02 -04:00
1 parent c48297e0d1
commit 3b6b304f55
2 files changed
+6 -2

No files matched your search

+3
View File
@@ -1210,6 +1210,9 @@ class AgentJobTest(Harness):
self.files = {".game": json.dumps({"error": 2})}
self.assertEqual(BNET["agent_job"](self.root, "uninstall", "gryphon", poll=0), 1)
self.assertEqual(self.lines[-1][0], "ERROR")
self.files = {".game": json.dumps({})}
self.assertEqual(BNET["agent_job"](self.root, "uninstall", "gryphon", poll=0), 0)
self.assertEqual(self.lines[-1], ("DONE", json.dumps({"uninstalled": "gryphon"})))
def test_without_battle_net_nothing_starts(self):
self.assertEqual(BNET["agent_job"](self.root, "install", "gryphon", "gryphon", str(self.tmp / "g"), "enUS", "USA", "US", poll=0), 3)