mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 01:23:55 +02:00
Simplification of layout selection (#384)
Removed the 2d/3d toggle and added that option into the layout dropdown. --------- Co-authored-by: KM-R <129882581+KM-R@users.noreply.github.com>
This commit is contained in:
@ -5,8 +5,10 @@ from unittest.mock import patch
|
||||
|
||||
import pandas as pd
|
||||
import pytest
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from aki_prj23_transparenzregister.ui.pages import home
|
||||
from aki_prj23_transparenzregister.ui.session_handler import SessionHandler
|
||||
|
||||
|
||||
def test_import() -> None:
|
||||
@ -14,7 +16,6 @@ def test_import() -> None:
|
||||
assert home is not None
|
||||
|
||||
|
||||
@pytest.mark.tim()
|
||||
def test_person_relation_type_filter() -> None:
|
||||
with patch(
|
||||
"aki_prj23_transparenzregister.ui.pages.home.get_all_person_relations"
|
||||
@ -28,7 +29,6 @@ def test_person_relation_type_filter() -> None:
|
||||
assert list(home.person_relation_type_filter()) == ["Eigentümer", "Inhaber"]
|
||||
|
||||
|
||||
@pytest.mark.tim()
|
||||
def test_company_relation_type_filter() -> None:
|
||||
with patch(
|
||||
"aki_prj23_transparenzregister.ui.pages.home.get_all_company_relations"
|
||||
@ -42,7 +42,6 @@ def test_company_relation_type_filter() -> None:
|
||||
assert list(home.company_relation_type_filter()) == ["Eigentümer", "Inhaber"]
|
||||
|
||||
|
||||
@pytest.mark.tim()
|
||||
def test_update_table() -> None:
|
||||
metrics = pd.DataFrame(
|
||||
[
|
||||
@ -192,3 +191,17 @@ def test_update_graph_data() -> None:
|
||||
frozenset({"HAFTENDER_GESELLSCHAFTER"}), frozenset("GESCHAEFTSFUEHRER")
|
||||
)
|
||||
assert graph_result is not None
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def _set_session(full_db: Session) -> Generator[None, None, None]:
|
||||
"""Sets a session for the dash application to be used."""
|
||||
SessionHandler.session = full_db
|
||||
yield
|
||||
SessionHandler.session = None
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("_set_session")
|
||||
def test_layout() -> None:
|
||||
"""Checks if layout can be executed."""
|
||||
home.layout()
|
||||
|
Reference in New Issue
Block a user