diff --git a/vizro-core/tests/unit/vizro/models/_navigation/test_accordion.py b/vizro-core/tests/unit/vizro/models/_navigation/test_accordion.py index cd9af9f80..d929e6c8a 100644 --- a/vizro-core/tests/unit/vizro/models/_navigation/test_accordion.py +++ b/vizro-core/tests/unit/vizro/models/_navigation/test_accordion.py @@ -113,9 +113,7 @@ class TestAccordionBuild: @pytest.mark.parametrize("pages, expected", test_cases) def test_accordion(self, pages, expected): accordion = vm.Accordion(id="accordion", pages=pages).build(active_page_id="Page 1") - assert_component_equal( - accordion, html.Div(id="nav-panel"), keys_to_strip={"children"} - ) + assert_component_equal(accordion, html.Div(id="nav-panel"), keys_to_strip={"children"}) assert_component_equal(accordion["accordion"], expected, keys_to_strip={"class_name", "className"}) def test_accordion_one_page(self): diff --git a/vizro-core/tests/unit/vizro/models/_navigation/test_nav_bar.py b/vizro-core/tests/unit/vizro/models/_navigation/test_nav_bar.py index da497c1a1..3a857ed64 100644 --- a/vizro-core/tests/unit/vizro/models/_navigation/test_nav_bar.py +++ b/vizro-core/tests/unit/vizro/models/_navigation/test_nav_bar.py @@ -94,11 +94,7 @@ def test_nav_bar_active_pages_as_dict(self, pages_as_dict): ] ) assert_component_equal(built_nav_bar["nav-bar"], expected_button, keys_to_strip={"id", "className"}) - assert_component_equal( - built_nav_bar["nav-panel"], - html.Div(id="nav-panel", className="nav_panel"), - keys_to_strip={"children"}, - ) + assert_component_equal(built_nav_bar["nav-panel"], html.Div(id="nav-panel"), keys_to_strip={"children"}) assert_component_equal(built_nav_bar["nav-panel"].children, [dbc.Accordion()], keys_to_strip=STRIP_ALL) def test_nav_bar_active_pages_as_list(self, pages_as_list): @@ -120,10 +116,7 @@ def test_nav_bar_active_pages_as_list(self, pages_as_list): ] ) assert_component_equal(built_nav_bar["nav-bar"], expected_buttons, keys_to_strip={"id", "className"}) - assert_component_equal( - built_nav_bar["nav-panel"], - html.Div(id="nav-panel", hidden=True), - ) + assert_component_equal(built_nav_bar["nav-panel"], html.Div(id="nav-panel", hidden=True)) def test_nav_bar_not_active_pages_as_dict(self, pages_as_dict): nav_bar = vm.NavBar(pages=pages_as_dict) @@ -160,7 +153,4 @@ def test_nav_bar_not_active_pages_as_list(self, pages_as_list): ] ) assert_component_equal(built_nav_bar["nav-bar"], expected_buttons, keys_to_strip={"id", "className"}) - assert_component_equal( - built_nav_bar["nav-panel"], - html.Div(id="nav-panel", hidden=True), - ) + assert_component_equal(built_nav_bar["nav-panel"], html.Div(id="nav-panel", hidden=True)) diff --git a/vizro-core/tests/unit/vizro/models/_navigation/test_navigation.py b/vizro-core/tests/unit/vizro/models/_navigation/test_navigation.py index 970397950..be0bf3efb 100644 --- a/vizro-core/tests/unit/vizro/models/_navigation/test_navigation.py +++ b/vizro-core/tests/unit/vizro/models/_navigation/test_navigation.py @@ -85,38 +85,22 @@ def test_default_nav_selector(self, pages, request): navigation.pre_build() built_navigation = navigation.build(active_page_id="Page 1") assert_component_equal(built_navigation["nav-bar"], html.Div(hidden=True, id="nav-bar")) - assert_component_equal( - built_navigation["nav-panel"], - html.Div(id="nav-panel"), - keys_to_strip={"children"}, - ) + assert_component_equal(built_navigation["nav-panel"], html.Div(id="nav-panel"), keys_to_strip={"children"}) assert_component_equal(built_navigation["nav-panel"].children, [dbc.Accordion()], keys_to_strip=STRIP_ALL) def test_non_default_nav_selector_pags_as_dict(self, pages_as_dict, built_nav_link=None): navigation = vm.Navigation(pages=pages_as_dict, nav_selector=vm.NavBar()) navigation.pre_build() built_navigation = navigation.build(active_page_id="Page 1") - assert_component_equal( - built_navigation["nav-bar"], - html.Div(id="nav-bar"), - keys_to_strip={"children"}, - ) - assert_component_equal( - built_navigation["nav-panel"], - html.Div(id="nav-panel"), - keys_to_strip={"children"}, - ) + assert_component_equal(built_navigation["nav-bar"], html.Div(id="nav-bar"), keys_to_strip={"children"}) + assert_component_equal(built_navigation["nav-panel"], html.Div(id="nav-panel"), keys_to_strip={"children"}) assert_component_equal(built_navigation["nav-panel"].children, [dbc.Accordion()], keys_to_strip=STRIP_ALL) def test_non_default_nav_selector_pages_as_list(self, pages_as_list): navigation = vm.Navigation(pages=pages_as_list, nav_selector=vm.NavBar()) navigation.pre_build() built_navigation = navigation.build(active_page_id="Page 1") - assert_component_equal( - built_navigation["nav-bar"], - html.Div(id="nav-bar"), - keys_to_strip={"children"}, - ) + assert_component_equal(built_navigation["nav-bar"], html.Div(id="nav-bar"), keys_to_strip={"children"}) assert_component_equal( built_navigation["nav-panel"], html.Div(id="nav-panel", hidden=True), keys_to_strip={"children"} )