mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Create repairs issue if an outdated currency code is configured (#81717)
* Create repairs issue if an outdated currency code is configured * Add script for updating list of currencies * Use black for formatting * Move currency codes to a separate file * Address review comments
This commit is contained in:
@@ -1332,3 +1332,15 @@ def test_currency():
|
||||
|
||||
for value in ("EUR", "USD"):
|
||||
assert schema(value)
|
||||
|
||||
|
||||
def test_historic_currency():
|
||||
"""Test historic currency validator."""
|
||||
schema = vol.Schema(cv.historic_currency)
|
||||
|
||||
for value in (None, "BTC", "EUR"):
|
||||
with pytest.raises(vol.MultipleInvalid):
|
||||
schema(value)
|
||||
|
||||
for value in ("DEM", "NLG"):
|
||||
assert schema(value)
|
||||
|
||||
Reference in New Issue
Block a user