def test_remove_exchange_rate(self): st = rockefeller.MemoryExchangeRates() st.remove_exchange_rate(usd, eur) assert st.get_exchange_rate(rockefeller.Currency.USD, rockefeller.Currency.EUR) is None assert st.get_exchange_rate(rockefeller.Currency.EUR, rockefeller.Currency.USD) is None
def test_not_stored_exchange_rate(self): st = rockefeller.MemoryExchangeRates() assert st.get_exchange_rate(rockefeller.Currency.USD, rockefeller.Currency.EUR) is None
def test_add_exchange_rate(self): st = rockefeller.MemoryExchangeRates() st.add_exchange_rate(usd, eur, 1.0) assert st.get_exchange_rate(rockefeller.Currency.USD, rockefeller.Currency.EUR) == 1.0