mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-21 23:53:55 +02:00
Added longitude/latitude and positional accuracy to the company data (#180)
This commit is contained in:
@ -177,12 +177,12 @@ def test_get_person_id_value_check(
|
||||
("name", "zip_code", "city", "id"),
|
||||
[
|
||||
("Some Company GmbH", "", "", 1),
|
||||
("Some Company GmbH", "12345", "", 1),
|
||||
("Some Company GmbH", "12345", "TV City", 1),
|
||||
("Some Company GmbH", "58644", "", 1),
|
||||
("Some Company GmbH", "58644", "TV City", 1),
|
||||
("Some Company GmbH", "", "TV City", 1),
|
||||
("Other Company GmbH", "", "", 2),
|
||||
("Other Company GmbH", "12345", "", 2),
|
||||
("Other Company GmbH", "12345", "TV City", 2),
|
||||
("Other Company GmbH", "58636", "", 2),
|
||||
("Other Company GmbH", "58636", "TV City", 2),
|
||||
("Other Company GmbH", "", "TV City", 2),
|
||||
("Third Company GmbH", "", "", 3),
|
||||
],
|
||||
@ -672,8 +672,11 @@ def test_relationships(documents: list[dict[str, Any]], full_db: Session) -> Non
|
||||
2: "Third Company GmbH",
|
||||
},
|
||||
"street": {0: "Sesamstr.", 1: "Sesamstr.", 2: None},
|
||||
"zip_code": {0: "12345", 1: "12345", 2: None},
|
||||
"zip_code": {0: "58644", 1: "58636", 2: None},
|
||||
"city": {0: "TV City", 1: "TV City", 2: None},
|
||||
"longitude": {0: 7.6968, 1: 7.7032, 2: None},
|
||||
"latitude": {0: 51.3246, 1: 51.38, 2: None},
|
||||
"pos_accuracy": {0: 4.0, 1: 4.0, 2: None},
|
||||
"last_update": {
|
||||
0: pd.Timestamp("2023-01-01 00:00:00"),
|
||||
1: pd.Timestamp("2023-01-01 00:00:00"),
|
||||
@ -1014,3 +1017,18 @@ def test_add_annual_report_financial_key_error(full_db: Session) -> None:
|
||||
{"financials": {"something-strange": 123.12}, "auditors": {}},
|
||||
db=full_db,
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.working_on()
|
||||
@pytest.mark.parametrize(
|
||||
("zip_code", "results"),
|
||||
[
|
||||
("44809", {"latitude": 51.4997, "longitude": 7.1944, "pos_accuracy": 4.0}),
|
||||
(None, {}),
|
||||
("", {}),
|
||||
("60547", {}),
|
||||
("58590", {}),
|
||||
],
|
||||
)
|
||||
def test_get_geocodes(zip_code: str | None, results: dict) -> None:
|
||||
assert data_transfer.get_geocodes(zip_code) == results
|
||||
|
Reference in New Issue
Block a user