示例#1
0
 async def prepare_local_size_context(self, game_ids: List[str]) -> Dict[str, str]:
     library_folders = get_library_folders()
     app_manifests = list(get_app_manifests(library_folders))
     return {
         app_id_from_manifest_path(path): path
         for path in app_manifests
     }
def test_get_library_folders_parsing_error(mocker):
    path = "path"
    get_configuration_folder = mocker.patch("client.get_configuration_folder")
    get_configuration_folder.return_value = path
    get_custom_library_folders = mocker.patch("client.get_custom_library_folders")
    get_custom_library_folders.return_value = None
    assert get_library_folders() == [os.path.join(path, 'steamapps')]
    get_custom_library_folders.assert_called_once_with(os.path.join(path, "steamapps", "libraryfolders.vdf"))
示例#3
0
def test_get_library_folders_no_steam(mocker):
    get_configuration_folder = mocker.patch("client.get_configuration_folder")
    get_configuration_folder.return_value = None
    assert get_library_folders() == []
    get_configuration_folder.assert_called_once_with()