From a929277af8d3318b4320c9f209f7f5e65915425b Mon Sep 17 00:00:00 2001 From: Mike Date: Fri, 10 Nov 2023 12:41:14 +1300 Subject: [PATCH] More sophisticated algorithm that uses secondary historic rate for comparison if available --- tests/hdx/location/test_currency.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/hdx/location/test_currency.py b/tests/hdx/location/test_currency.py index 4cd16bb..a1f9be5 100755 --- a/tests/hdx/location/test_currency.py +++ b/tests/hdx/location/test_currency.py @@ -563,3 +563,6 @@ def test_get_adjclose(self, retrievers, secondary_historic_url): } timestamp = Currency._get_int_timestamp(parse_date("2015-12-15")) assert Currency._get_adjclose(indicators, "COP", timestamp) == 3270 + + Currency._no_historic = True + assert Currency._get_adjclose(indicators, "COP", timestamp) is None