Skip to content

Commit d49a3a5

Browse files
cgoudetleonarf
authored andcommitted
update tests from ontology renaming
1 parent bdff0a5 commit d49a3a5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

enthic/scraping/liasse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def _parse_bilan(soup: BeautifulSoup, type_bilan: str) -> dict:
122122

123123
fields = (
124124
ontology.read_account()
125-
.pipe(lambda df: df[df["accountability"] == type_bilan])
125+
.pipe(lambda df: df[df["accountability_code"] == type_bilan])
126126
.to_dict(orient="records")
127127
)
128128

@@ -132,9 +132,9 @@ def _parse_bilan(soup: BeautifulSoup, type_bilan: str) -> dict:
132132

133133

134134
def _get_field_amount(bilan: BeautifulSoup, field: dict) -> dict:
135-
element = bilan.find("liasse", {"code": field["code"]})
135+
element = bilan.find("liasse", {"code": field["bundle_name"]})
136136
if not element:
137-
return field["code"], None
137+
return field["bundle_name"], None
138138
column = field["column"]
139139
amount = element.get(f"m{column}")
140-
return field["code"], amount if amount is None else int(amount)
140+
return field["bundle_name"], amount if amount is None else int(amount)

0 commit comments

Comments
 (0)