Skip to content

Commit

Permalink
fix storage test
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Aug 2, 2024
1 parent 461cf26 commit 2008db5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import httpx
import pytest

from nicegui import app, background_tasks, context, ui
from nicegui import app, background_tasks, context, core, ui
from nicegui import storage as storage_module
from nicegui.testing import Screen

Expand Down Expand Up @@ -285,6 +285,7 @@ def test_missing_storage_secret(screen: Screen):
def page():
ui.label(app.storage.user.get('message', 'no message'))

core.app.user_middleware.clear() # remove the session middlewares added by prepare_simulation by default
screen.open('/')
screen.assert_py_logger('ERROR', 'app.storage.user needs a storage_secret passed in ui.run()')

Expand Down

0 comments on commit 2008db5

Please sign in to comment.