From 94b7f700c53560344b61052808a8fd0e06a708a6 Mon Sep 17 00:00:00 2001 From: daya0576 Date: Fri, 11 Oct 2024 06:03:45 +0800 Subject: [PATCH] Fix unittest --- tests/test_main_page.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_main_page.py b/tests/test_main_page.py index aa3ffdcb..6ffe1e25 100644 --- a/tests/test_main_page.py +++ b/tests/test_main_page.py @@ -12,9 +12,6 @@ # https://github.com/zauberzeug/nicegui/tree/main/tests -app.add_static_files("/statics", "statics") - - def dummy_today(): return datetime.date(2024, 5, 1) @@ -25,6 +22,8 @@ def dummy_days(count): def test_index_page(screen: Screen) -> None: + app.add_static_files("/statics", "statics") + days = dummy_days(7) habits = dummy_habit_list(days) @@ -35,6 +34,8 @@ def test_index_page(screen: Screen) -> None: def test_add_page(screen: Screen) -> None: + app.add_static_files("/statics", "statics") + days = dummy_days(7) habits = dummy_habit_list(days) @@ -45,6 +46,8 @@ def test_add_page(screen: Screen) -> None: def test_habit_detail_page(screen: Screen) -> None: + app.add_static_files("/statics", "statics") + days = dummy_days(7) today = days[-1] habits = dummy_habit_list(days)