From 413e44fed4be5171edcb8c193cdabda6b6b95ef6 Mon Sep 17 00:00:00 2001 From: Dariusz L Date: Sun, 2 Aug 2026 18:28:28 +0200 Subject: [PATCH] test: lock downloader facade exports --- tests/test_download_api.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/test_download_api.py diff --git a/tests/test_download_api.py b/tests/test_download_api.py new file mode 100644 index 0000000..03e1dec --- /dev/null +++ b/tests/test_download_api.py @@ -0,0 +1,17 @@ +import importlib + + +def test_downloader_facade_exports_only_supported_operations(): + facade = importlib.import_module("core.downloader") + + assert set(facade.__all__) == { + "cancel_download", + "clear_completed_downloads", + "download_file", + "download_model", + "get_all_progress", + "get_progress", + "start_background_download", + } + assert not hasattr(facade, "_aria2_rpc") + assert not hasattr(facade, "write_model_resolver_metadata")