1
0
fin-defs/test/test_currency.py

12 lines
279 B
Python
Raw Normal View History

2024-10-27 16:24:12 +00:00
import fin_defs
2024-10-27 16:24:26 +00:00
2024-10-27 16:24:12 +00:00
def test_from_currency_symbol():
assert fin_defs.FiatCurrency.from_currency_symbol('$') == fin_defs.USD
assert fin_defs.FiatCurrency.from_currency_symbol('TEST') is None
2024-10-27 16:24:26 +00:00
2024-10-27 16:24:12 +00:00
def test_currency_symbol():
assert fin_defs.USD.to_currency_symbol() == '$'