Skip to content

Commit

Permalink
reset ui.notify during teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Aug 8, 2024
1 parent ec769b7 commit 864a3c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nicegui/testing/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import nicegui.storage
from nicegui import Client, app, binding, core, run, ui
from nicegui.functions.navigate import Navigate
from nicegui.functions.notify import notify
from nicegui.page import page

from .screen import Screen
Expand Down Expand Up @@ -143,6 +144,7 @@ async def user(nicegui_reset_globals, # pylint: disable=unused-argument
async with httpx.AsyncClient(app=core.app, base_url='http://test') as client:
yield User(client)
ui.navigate = Navigate()
ui.notify = notify


@pytest.fixture
Expand All @@ -155,6 +157,7 @@ async def create_user(nicegui_reset_globals, # pylint: disable=unused-argument
async with core.app.router.lifespan_context(core.app):
yield lambda: User(httpx.AsyncClient(app=core.app, base_url='http://test'))
ui.navigate = Navigate()
ui.notify = notify


@pytest.fixture()
Expand Down

0 comments on commit 864a3c3

Please sign in to comment.