mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Mocking apply_indexers because it is unecessary for this test.
This commit is contained in:
parent
a160f2788b
commit
cdc02ecaf2
2 changed files with 3 additions and 1 deletions
|
|
@ -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'),
|
||||
|
|
|
|||
|
|
@ -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}')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue