Add comprehensive test suite to improve coverage and fix igdblib bugs
- Add extensive tests for igdblib.py (0% -> 100% coverage expected) - Add tests for leonardo_draw.py AI image generation - Add tests for openai_responder.py with GPT integration - Add tests for discord_bot.py bot functionality - Add extended tests for ai_responder.py edge cases - Fix critical bugs in igdblib.py: * Fix platforms() method treating name as string instead of list * Fix game_info() method missing endpoint parameter * Add safe dictionary access with .get() methods Coverage improvements target areas with lowest coverage to maximize impact. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -60,18 +60,19 @@ class IGDBQuery(object):
|
||||
)
|
||||
ret = {}
|
||||
for p in platforms:
|
||||
names = p["name"]
|
||||
names = [p["name"]]
|
||||
if "alternative_name" in p:
|
||||
names.append(p["alternative_name"])
|
||||
if "abbreviation" in p:
|
||||
names.append(p["abbreviation"])
|
||||
family = self.platform_families()[p["id"]] if "platform_family" in p else None
|
||||
family = self.platform_families().get(p.get("platform_family")) if "platform_family" in p else None
|
||||
ret[p["id"]] = {"names": names, "family": family}
|
||||
return ret
|
||||
|
||||
def game_info(self, name):
|
||||
game_info = self.generalized_igdb_query(
|
||||
{"name": name},
|
||||
"games",
|
||||
[
|
||||
"id",
|
||||
"name",
|
||||
|
||||
Reference in New Issue
Block a user