Reworked the tests.

This commit is contained in:
2024-01-11 00:35:23 +01:00
parent 1b15be514d
commit 3a5209c411

View File

@ -27,8 +27,7 @@ COLOR_PERSON = "#ff5200"
@cached( # type: ignore @cached( # type: ignore
cache=TTLCache(maxsize=100, ttl=int(os.getenv("PYTHON_CACHE_TTL", "3600"))), cache=TTLCache(maxsize=100, ttl=int(os.getenv("PYTHON_CACHE_TTL", "3600")))
key=lambda session, company_id: hash((company_id, str(session.bind))),
) )
def find_all_company_relations() -> pd.DataFrame: def find_all_company_relations() -> pd.DataFrame:
"""_summary_. """_summary_.
@ -110,7 +109,7 @@ def get_all_company_relations() -> pd.DataFrame:
@cached( # type: ignore @cached( # type: ignore
cache=TTLCache(maxsize=100, ttl=int(os.getenv("PYTHON_CACHE_TTL", "3600"))), cache=TTLCache(maxsize=100, ttl=int(os.getenv("PYTHON_CACHE_TTL", "3600"))),
key=lambda session, company_id: hash((company_id, str(session.bind))), key=lambda drop_min_person_links: hash(drop_min_person_links),
) )
def get_all_person_relations(drop_min_person_links: bool) -> pd.DataFrame: def get_all_person_relations(drop_min_person_links: bool) -> pd.DataFrame:
"""These method makes a Database Request for all Persons and their relations, modifies the ID Column and returns the Result as an DataFrame. """These method makes a Database Request for all Persons and their relations, modifies the ID Column and returns the Result as an DataFrame.