[claude] Add unit tests for quest_system.py (#1292) #1309
Reference in New Issue
Block a user
Delete Branch "claude/issue-1292"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1292
Adds
tests/timmy/test_quest_system.pywith 60+ unit tests covering:QuestDefinition.from_dict()including edge cases and invalid quest typesQuestProgress.to_dict()roundtrip serializationget_quest_definitions,get_quest_definition,get_active_quests_get_target_valuefor allQuestTypevariants with missing-key defaultsget_or_create_progresslifecycle and error on unknown questupdate_quest_progressstate transitions (complete on target, re-completion guard)_is_on_cooldownfor repeatable/non-repeatable, zero cooldown, expired cooldown, invalid timestampsclaim_quest_reward— success path, ledger error fallback, repeatable reset, cooldown guardcheck_issue_count_quest,check_issue_reduce_quest,check_daily_run_questevaluate_quest_progressdispatch for all quest types, disabled/missing quest guards, cooldown bypassreset_quest_progressby quest, by agent, combined, emptyget_quest_leaderboardordering and token aggregationget_agent_quests_statusstructure andcooldown_hours_remainingcalculationAll 577 unit tests pass.