diff --git a/tests/utils/data_extraction/unternehmensregister/transform_test.py b/tests/utils/data_extraction/unternehmensregister/transform_test.py index d163184..f6fff63 100644 --- a/tests/utils/data_extraction/unternehmensregister/transform_test.py +++ b/tests/utils/data_extraction/unternehmensregister/transform_test.py @@ -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: