mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-12 05:42:59 +00:00
fix: Align MLBLiveManager test data with expected structure
This commit is contained in:
@@ -372,17 +372,16 @@ class MLBLiveManager(BaseMLBManager):
|
|||||||
"away_team": "TEX",
|
"away_team": "TEX",
|
||||||
"home_score": "3",
|
"home_score": "3",
|
||||||
"away_score": "2",
|
"away_score": "2",
|
||||||
|
"status": "live",
|
||||||
|
"status_state": "live",
|
||||||
"inning": 5,
|
"inning": 5,
|
||||||
"inning_half": "top",
|
"inning_half": "top",
|
||||||
"balls": 2,
|
"balls": 2,
|
||||||
"strikes": 1,
|
"strikes": 1,
|
||||||
"outs": 1,
|
"bases_occupied": [True, False, True],
|
||||||
"bases_occupied": [True, False, True], # 1st and 3rd base occupied
|
|
||||||
"home_logo_path": os.path.join(self.logo_dir, "TB.png"),
|
"home_logo_path": os.path.join(self.logo_dir, "TB.png"),
|
||||||
"away_logo_path": os.path.join(self.logo_dir, "TEX.png"),
|
"away_logo_path": os.path.join(self.logo_dir, "TEX.png"),
|
||||||
"game_time": "7:30 PM",
|
"start_time": datetime.now(timezone.utc).isoformat(),
|
||||||
"game_date": "Apr 17",
|
|
||||||
"status": "live"
|
|
||||||
}
|
}
|
||||||
self.live_games = [self.current_game]
|
self.live_games = [self.current_game]
|
||||||
self.logger.info("Initialized MLBLiveManager with test game: TB vs TEX")
|
self.logger.info("Initialized MLBLiveManager with test game: TB vs TEX")
|
||||||
@@ -665,6 +664,9 @@ class MLBUpcomingManager(BaseMLBManager):
|
|||||||
continue # Skip non-favorite team games
|
continue # Skip non-favorite team games
|
||||||
|
|
||||||
game_time = datetime.fromisoformat(game['start_time'].replace('Z', '+00:00'))
|
game_time = datetime.fromisoformat(game['start_time'].replace('Z', '+00:00'))
|
||||||
|
# Ensure game_time is timezone-aware (UTC)
|
||||||
|
if game_time.tzinfo is None:
|
||||||
|
game_time = game_time.replace(tzinfo=timezone.utc)
|
||||||
logger.info(f"Checking favorite team game: {game['away_team']} @ {game['home_team']} at {game_time}")
|
logger.info(f"Checking favorite team game: {game['away_team']} @ {game['home_team']} at {game_time}")
|
||||||
logger.info(f"Game status: {game['status']}, State: {game['status_state']}")
|
logger.info(f"Game status: {game['status']}, State: {game['status_state']}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user