diff --git a/liberapay/constants.py b/liberapay/constants.py index c1629f27d..22d5d1055 100644 --- a/liberapay/constants.py +++ b/liberapay/constants.py @@ -114,8 +114,8 @@ def generate_value(self, currency): EPOCH = datetime(1970, 1, 1, 0, 0, 0, 0, utc) -EUROZONE = set("AT BE CY DE EE ES FI FR GR IE IT LT LU LV MT NL PT SI SK".split()) -SEPA = EUROZONE | set("AD BG CH CZ DK GB GI HR HU IS LI MC NO PL RO SE VA".split()) +EUROZONE = set("AT BE CY DE EE ES FI FR GR HR IE IT LT LU LV MT NL PT SI SK".split()) +SEPA = EUROZONE | set("AD BG CH CZ DK GB GI HU IS LI MC NO PL RO SE VA".split()) EVENTS = [ Event('income', 1, _("Every week as long as I am receiving donations")), diff --git a/tests/py/test_crypto.py b/tests/py/test_crypto.py index de65c3bce..3a54f7536 100644 --- a/tests/py/test_crypto.py +++ b/tests/py/test_crypto.py @@ -1,4 +1,5 @@ import os +import warnings import pytest @@ -57,13 +58,13 @@ def test_key_rotation(self): assert new_info_2.payload == new_info.payload def test_encrypt_dict_warns_of_single_key(self): - with pytest.warns(CryptoWarning, match="dict only contains one key") as warnings: + with pytest.warns(CryptoWarning, match="dict only contains one key") as w: self.website.cryptograph.encrypt_dict({"long_single_key": None}) - assert len(warnings) == 1 - with pytest.warns(None) as warnings: + assert len(w) == 1 + with warnings.catch_warnings(record=True) as w: self.website.cryptograph.encrypt_dict({}) self.website.cryptograph.encrypt_dict({0: 1, 2: 3, 4: 5}) - assert len(warnings) == 0 + assert len(w) == 0 def test_encrypt_dict_randomizes_order(self): cryptograph = self.website.cryptograph diff --git a/www/%username/edit/goal.spt b/www/%username/edit/goal.spt index 4f19edb4e..36aa723d6 100644 --- a/www/%username/edit/goal.spt +++ b/www/%username/edit/goal.spt @@ -49,9 +49,9 @@ subhead = _("Goal") 0 else '' }}/> {{ GOAL_PARTS[0] }} + % set goal_currency = participant.main_currency +