Skip to content

Commit

Permalink
correctly reset the ui.download function after user tests
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Feb 27, 2025
1 parent 743c205 commit fc203e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nicegui/testing/user_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pytest

from nicegui import Client, core, ui
from nicegui.functions.download import download
from nicegui.functions.navigate import Navigate
from nicegui.functions.notify import notify

Expand Down Expand Up @@ -46,6 +47,7 @@ async def user(nicegui_reset_globals, # noqa: F811, pylint: disable=unused-argu
yield User(client)
ui.navigate = Navigate()
ui.notify = notify
ui.download = download


@pytest.fixture
Expand All @@ -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'))
ui.navigate = Navigate()
ui.notify = notify
ui.download = download

0 comments on commit fc203e0

Please sign in to comment.