Skip to content

Commit

Permalink
fix: update labels and entities name in test cases following recent c…
Browse files Browse the repository at this point in the history
…hanges in update_xls_form (#317)
  • Loading branch information
Sujanadh authored Nov 23, 2024
1 parent daf8874 commit 9db8038
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_update_xlsform.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ async def test_add_extra_select_from_file():
survey_sheet = workbook["survey"]
name_column = [cell.value for cell in survey_sheet["B"]]

assert "road" in name_column, "The 'road' field was not added to the survey sheet."
assert "waterpoint" in name_column, "The 'waterpoint' field was not added to the survey sheet."
assert "roads" in name_column, "The 'roads' field was not added to the survey sheet."
assert "waterpoints" in name_column, "The 'waterpoints' field was not added to the survey sheet."


async def test_buildings_xlsform():
Expand All @@ -82,7 +82,7 @@ async def test_buildings_xlsform():

workbook = load_workbook(filename=BytesIO(updated_form.getvalue()))
translation_found, label_field_found = check_translation_fields(workbook)
assert translation_found, "'label::English(en)' field not found in the survey sheet."
assert translation_found, "'label::english(en)' field not found in the survey sheet."
assert not label_field_found, "'label' field should not be present after merging translations."


Expand Down Expand Up @@ -145,7 +145,7 @@ def check_translation_fields(workbook: Workbook):
for row in survey_sheet.iter_rows(min_row=1, max_col=survey_sheet.max_column):
for cell in row:
# Check if the English translation label exists
if cell.value == "label::English(en)":
if cell.value == "label::english(en)":
translation_found = True

# Ensure that the base 'label' field is no longer present
Expand Down

0 comments on commit 9db8038

Please sign in to comment.