mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-26 10:22:34 +02:00
test(data-extraction): Adapt unit tests to new behaviour
This commit is contained in:
parent
b7d877ef81
commit
600039207d
@ -12,14 +12,36 @@ from aki_prj23_transparenzregister.utils.enum_types import FinancialKPIEnum
|
|||||||
def test_extract_auditor_company_no_hits() -> None:
|
def test_extract_auditor_company_no_hits() -> None:
|
||||||
input_data = """
|
input_data = """
|
||||||
<b>
|
<b>
|
||||||
|
Mega GmbH
|
||||||
Nothing to see here
|
Nothing to see here
|
||||||
</b>
|
</b>
|
||||||
"""
|
"""
|
||||||
ba = Bundesanzeiger()
|
ba = Bundesanzeiger()
|
||||||
result = ba.extract_auditor_company(input_data)
|
result = ba.extract_auditor_company(input_data, "Mega GmbH")
|
||||||
assert result is None
|
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:
|
def test_extract_auditor_company() -> None:
|
||||||
company_name = "Korrupte Wirtschaftsprüfer GmbH & Co. KG"
|
company_name = "Korrupte Wirtschaftsprüfer GmbH & Co. KG"
|
||||||
input_data = f"""
|
input_data = f"""
|
||||||
@ -30,7 +52,7 @@ def test_extract_auditor_company() -> None:
|
|||||||
</b>
|
</b>
|
||||||
"""
|
"""
|
||||||
ba = Bundesanzeiger()
|
ba = Bundesanzeiger()
|
||||||
result = ba.extract_auditor_company(input_data)
|
result = ba.extract_auditor_company(input_data, "Super AG")
|
||||||
assert result == company_name
|
assert result == company_name
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user