Skip to content

Commit

Permalink
refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Jul 19, 2023
1 parent 82502bc commit 133dc0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions onadata/libs/tests/utils/test_export_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2050,10 +2050,10 @@ def _test_sav_file(section):
section_name = section["name"].replace("/", "_")
_test_sav_file(section_name)

def test_export_zipped_zap_missing_lang_label(self):
def test_export_zipped_zap_missing_en_label(self):
"""Blank language label defaults to label for default language"""
survey = create_survey_from_xls(
_logger_fixture_path("childrens_survey_sw_missing_lang_label.xlsx"),
_logger_fixture_path("childrens_survey_sw_missing_en_label.xlsx"),
default_name="childrens_survey_sw",
)
# default_language is set to swahili
Expand Down Expand Up @@ -2081,6 +2081,7 @@ def test_export_zipped_zap_missing_lang_label(self):
section_name = section["name"]

if section_name == "childrens_survey_sw":
# Default swahili label is used incase english label is missing for question
result = filter(
lambda question: question["label"] == "1. Jina lako ni?",
section["elements"],
Expand All @@ -2089,6 +2090,7 @@ def test_export_zipped_zap_missing_lang_label(self):
checks += 1

if section_name == "children":
# Default swahili label is used incase english label is missing for choice
result = filter(
lambda choice: choice["label"] == "fav_colors/Nyekundu",
section["elements"],
Expand Down

0 comments on commit 133dc0e

Please sign in to comment.