1
0
fin-defs/test/test_currency.py

12 lines
292 B
Python

import pytest
import fin_defs
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
def test_currency_symbol():
assert fin_defs.USD.to_currency_symbol() == '$'