We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a16515e commit 9becbcdCopy full SHA for 9becbcd
tests/main/test_game_storage.py
@@ -38,6 +38,15 @@ def test_retrieve_empty_games(self):
38
games = retrieve_stored_games()
39
self.assertEqual(games, [])
40
41
+ def test_retrieve_none_games(self):
42
+ """Test the retrieve_stored_games function with None saved_games"""
43
+ mock_user_data_manager = create_autospec(UserDataManager, instance=True)
44
+ mock_user_data_manager.saved_games = None
45
+
46
+ with patch("mastermind.main.game_storage.userdata", new=mock_user_data_manager):
47
+ games = retrieve_stored_games()
48
+ self.assertEqual(games, [])
49
50
def test_list_continuable_games_index(self):
51
"""Test the list_continuable_games_index function"""
52
continuable_indexes = list_continuable_games_index(self.sample_games)
0 commit comments