diff --git a/modules/videos/channel/test/test_api.py b/modules/videos/channel/test/test_api.py index 10fe963e..8e022282 100644 --- a/modules/videos/channel/test/test_api.py +++ b/modules/videos/channel/test/test_api.py @@ -280,7 +280,8 @@ async def test_download_channel_no_refresh(test_session, download_channel, video return DownloadResult(success=True) with mock.patch('modules.videos.downloader.YDL.extract_info') as mock_extract_info, \ - mock.patch('modules.videos.downloader.VideoDownloader.do_download', do_download): + mock.patch('modules.videos.downloader.VideoDownloader.do_download', do_download), \ + mock.patch('wrolpi.files.lib.apply_indexers'): # TODO why does apply_indexers break this test? entries = [ dict(id=vid.source_id, view_count=0, webpage_url='https://example.com/1'), # Already downloaded. dict(id='not downloaded', view_count=0, webpage_url='https://example.com/2'), diff --git a/wrolpi/files/lib.py b/wrolpi/files/lib.py index eb72ef83..2ddcc7db 100644 --- a/wrolpi/files/lib.py +++ b/wrolpi/files/lib.py @@ -385,6 +385,7 @@ async def refresh_directory_files_recursively(directory: Union[pathlib.Path, str curs.execute(stmt, params) apply_after_refresh() + await apply_indexers() refresh_logger.info(f'Done refreshing files in {directory}')