Procházet zdrojové kódy

correctly reset the `ui.download` function after user tests

Falko Schindler před 2 měsíci
rodič
revize
fc203e0c86
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      nicegui/testing/user_plugin.py

+ 3 - 0
nicegui/testing/user_plugin.py

@@ -5,6 +5,7 @@ import httpx
 import pytest
 import pytest
 
 
 from nicegui import Client, core, ui
 from nicegui import Client, core, ui
+from nicegui.functions.download import download
 from nicegui.functions.navigate import Navigate
 from nicegui.functions.navigate import Navigate
 from nicegui.functions.notify import notify
 from nicegui.functions.notify import notify
 
 
@@ -46,6 +47,7 @@ async def user(nicegui_reset_globals,  # noqa: F811, pylint: disable=unused-argu
             yield User(client)
             yield User(client)
     ui.navigate = Navigate()
     ui.navigate = Navigate()
     ui.notify = notify
     ui.notify = notify
+    ui.download = download
 
 
 
 
 @pytest.fixture
 @pytest.fixture
@@ -59,3 +61,4 @@ async def create_user(nicegui_reset_globals,  # noqa: F811, pylint: disable=unus
         yield lambda: User(httpx.AsyncClient(transport=httpx.ASGITransport(core.app), base_url='http://test'))
         yield lambda: User(httpx.AsyncClient(transport=httpx.ASGITransport(core.app), base_url='http://test'))
     ui.navigate = Navigate()
     ui.navigate = Navigate()
     ui.notify = notify
     ui.notify = notify
+    ui.download = download