Skip to content

Commit

Permalink
unquote symbols in time string
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfromearth committed Nov 8, 2024
1 parent 58809d9 commit 214a499
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_harmony.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from unittest.mock import patch
from os import environ
from pathlib import Path
from urllib.parse import urlsplit
from urllib.parse import urlsplit, unquote

from netCDF4 import Dataset
import pytest
Expand Down Expand Up @@ -85,8 +85,8 @@ def test_service_invoke(self):
print(f"properties['end_datetime'] === f{properties['end_datetime']}")
print(f"href === f{data['href']}")
print(f"title === f{data['href']}")
self.assertTrue(data['href'].endswith(f"{properties['end_datetime']}_{collection_name}_merged.nc4"))
self.assertEqual(data['title'], f"{properties['end_datetime']}_{collection_name}_merged.nc4")
self.assertTrue(unquote(data['href'], encoding='utf-8', errors='replace').endswith(f"{properties['end_datetime']}_{collection_name}_merged.nc4"))
self.assertEqual(unquote(data['title'], encoding='utf-8', errors='replace'), f"{properties['end_datetime']}_{collection_name}_merged.nc4")
self.assertEqual(data['type'], 'application/x-netcdf4')
self.assertEqual(data['roles'], ['data'])

Expand Down

0 comments on commit 214a499

Please sign in to comment.