Changeset View
Changeset View
Standalone View
Standalone View
swh/scanner/tests/test_dashboard.py
# Copyright (C) 2020 The Software Heritage developers | # Copyright (C) 2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import dash_html_components as html | import dash_html_components as html | ||||
from swh.scanner.dashboard.dashboard import generate_table_body | from swh.scanner.dashboard.dashboard import generate_table_body | ||||
def test_generate_table_body(example_tree, temp_folder): | def test_generate_table_body(example_tree, temp_folder): | ||||
subdir_path = temp_folder["subdir"] | subdir_path = temp_folder["subdir"] | ||||
for path, swhid in temp_folder["paths"].items(): | for path, swhid in temp_folder["paths"].items(): | ||||
example_tree.addNode(path, swhid, True) | example_tree.add_node(path, swhid, True) | ||||
generated_body = generate_table_body(subdir_path, example_tree) | generated_body = generate_table_body(subdir_path, example_tree) | ||||
expected_body = [ | expected_body = [ | ||||
html.Tbody( | html.Tbody( | ||||
[ | [ | ||||
html.Tr( | html.Tr( | ||||
[ | [ | ||||
Show All 28 Lines |