test(data-extraction): Adapt unit tests to new behaviour

This commit is contained in:
TrisNol 2023-10-17 18:16:44 +02:00
parent b7d877ef81
commit 600039207d

View File

@ -12,14 +12,36 @@ from aki_prj23_transparenzregister.utils.enum_types import FinancialKPIEnum
def test_extract_auditor_company_no_hits() -> None:
input_data = """
<b>
Mega GmbH
Nothing to see here
</b>
"""
ba = Bundesanzeiger()
result = ba.extract_auditor_company(input_data)
result = ba.extract_auditor_company(input_data, "Mega GmbH")
assert result is None
def test_extract_auditor_company_self_referencing() -> None:
company = "Mega GmbH"
auditor_company = "Super AG"
input_data = f"""
<b>
{company}
<br>
Nothing to see here
</b>
<b>
{auditor_company}
<br>
Nothing to see here
</b>
"""
ba = Bundesanzeiger()
result = ba.extract_auditor_company(input_data, company)
assert result == auditor_company
def test_extract_auditor_company() -> None:
company_name = "Korrupte Wirtschaftsprüfer GmbH & Co. KG"
input_data = f"""
@ -30,7 +52,7 @@ def test_extract_auditor_company() -> None:
</b>
"""
ba = Bundesanzeiger()
result = ba.extract_auditor_company(input_data)
result = ba.extract_auditor_company(input_data, "Super AG")
assert result == company_name