diff --git a/modules/zim/test/test_lib.py b/modules/zim/test/test_lib.py index 70e473e1..945aebf1 100644 --- a/modules/zim/test/test_lib.py +++ b/modules/zim/test/test_lib.py @@ -376,7 +376,7 @@ async def test_zim_subscription_download_import(async_client, test_session): for _ in range(1): # Import twice. # Importing the config restores the Download and ZimSubscription. - await import_downloads_config(test_session) + await import_downloads_config() recurring, once = test_session.query(Download).order_by(Download.frequency) assert once.url == 'https://download.kiwix.org/zim/wikibooks/wikibooks_en_all_maxi_2021-03.zim' assert test_session.query(Download).count() == 2 diff --git a/wrolpi/downloader.py b/wrolpi/downloader.py index 367546aa..a7b3fc9b 100644 --- a/wrolpi/downloader.py +++ b/wrolpi/downloader.py @@ -1436,7 +1436,7 @@ def save_downloads_config(): save_downloads_config: ActivateSwitchMethod -async def import_downloads_config(session: Session): +async def import_downloads_config(): """Upsert all Downloads in the Download Manager Config into the DB. The config is the source of truth.""" diff --git a/wrolpi/test/test_downloader.py b/wrolpi/test/test_downloader.py index d751c772..37460a98 100644 --- a/wrolpi/test/test_downloader.py +++ b/wrolpi/test/test_downloader.py @@ -415,7 +415,7 @@ async def test_crud_download(async_client, test_session, test_download_manager, async def test_downloads_config(test_session, test_download_manager, test_download_manager_config, test_downloader, assert_downloads, tag_factory, await_switches): # Can import with an empty config. - await import_downloads_config(test_session) + await import_downloads_config() assert_downloads([]) test_downloader.set_test_success() @@ -479,7 +479,7 @@ async def test_downloads_config(test_session, test_download_manager, test_downlo get_download_manager_config().initialize() # Import the saved downloads. - await import_downloads_config(test_session) + await import_downloads_config() expected = [ dict( url='https://example.com/2', @@ -504,7 +504,7 @@ async def test_downloads_config(test_session, test_download_manager, test_downlo assert_downloads(expected) # Import again, no duplicates. - await import_downloads_config(test_session) + await import_downloads_config() assert_downloads(expected)