Update tests/utils/data_extraction/unternehmensregister/transform_test.py

Co-authored-by: Philipp Horstenkamp <philipp@horstenkamp.de>
This commit is contained in:
Tristan Nolde 2023-10-15 13:07:34 +02:00 committed by GitHub
parent f6f4c99147
commit fd47487367
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -731,6 +731,56 @@ def test_map_last_update() -> None:
],
},
),
(
{
"location": Location(
"", "c/o Youco24 Business Center, Abc Str.", "42", "58644"
),
"relationships": [],
},
{
"location": Location("Iserlohn", "Abc Str.", "42", "58644"),
"relationships": [
CompanyToCompanyRelationship(
RelationshipRoleEnum.LOKATION_BEI, # type: ignore
Location("Iserlohn", "Abc ffda", "42", "58644"),
CompanyRelationshipEnum.COMPANY,
"Youco24 Business Center",
)
],
},
),
(
{
"location": Location(
"Iserlohn", "Abc Str. 42, c/o Youco24 Business Center", None, "58644"
),
"relationships": [],
},
{
"location": Location("Iserlohn", "Abc Str.", "42", "58644"),
"relationships": [
CompanyToCompanyRelationship(
RelationshipRoleEnum.LOKATION_BEI, # type: ignore
Location("Iserlohn", "Abc ffda", "42", "58644"),
CompanyRelationshipEnum.COMPANY,
"Youco24 Business Center",
)
],
},
),
(
{
"location": Location(
"Iserlohn", "Abc Str. 42, c/o", None, "58644"
),
"relationships": [],
},
{
"location": Location("Iserlohn", "Abc Str.", "42", "58644"),
"relationships": [],
},
),
],
)
def test_map_co_relation(value: dict, expected_result: dict) -> None: