aki_prj23_transparenzregister/tests/ui/company_page_test.py
KM-R 9566276047
Create multi page layout (#147)
Created two pages (home and company), page reloads after company
selection in dropdown or clicking the home button.
2023-09-26 18:38:40 +02:00

28 lines
785 B
Python

"""Tests for the company page dashboard."""
from collections.abc import Generator
import pytest
from sqlalchemy.orm import Session
from aki_prj23_transparenzregister.ui.pages import company
from aki_prj23_transparenzregister.ui.session_handler import SessionHandler
@pytest.fixture(autouse=True)
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
def test_import() -> None:
"""Checks if an import of the company page can be made."""
assert company is not None
def test_layout() -> None:
"""Checks if the company page can be created."""
selected_company_id = "2"
company.layout(selected_company_id)