Skip to content

Commit

Permalink
Merge pull request #266 from hotosm/fix/tests
Browse files Browse the repository at this point in the history
Fix : Unit Test cases
  • Loading branch information
kshitijrajsharma authored Aug 9, 2024
2 parents a9f9bd8 + 8fa273a commit 95fd1ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ def extract_current_data(self, exportname):

dump_temp_file_path = os.path.join(
working_dir,
f"{self.params.file_name if self.params.file_name else 'Export'}{'' if output_type == RawDataOutputType.MVT.value else f'.{output_type.lower()}'}",
f"{self.params.file_name if self.params.file_name else 'Export'}{f'.{output_type.lower()}'}",
)

try:
Expand All @@ -749,6 +749,10 @@ def extract_current_data(self, exportname):
RawDataOutputType.MBTILES.value,
RawDataOutputType.MVT.value,
]:
dump_temp_file_path = os.path.join(
working_dir,
f"{self.params.file_name if self.params.file_name else 'Export'}{'' if output_type == RawDataOutputType.MVT.value else f'.{output_type.lower()}'}",
)
RawData.ogr_export(
query=raw_currentdata_extraction_query(
self.params,
Expand Down
2 changes: 2 additions & 0 deletions tests/test_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def wait_for_task_completion(track_link, max_attempts=12, interval_seconds=5):

if check_status == "SUCCESS":
return res # Task completed successfully
if check_status == "FAILURE":
raise AssertionError(f"Task failed {res}")

if attempt == max_attempts:
raise AssertionError(
Expand Down

0 comments on commit 95fd1ff

Please sign in to comment.