Ejemplo n.º 1
0
    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
Ejemplo n.º 2
0
    def test_not_stored_exchange_rate(self):
        st = rockefeller.MemoryExchangeRates()

        assert st.get_exchange_rate(rockefeller.Currency.USD,
                                    rockefeller.Currency.EUR) is None
Ejemplo n.º 3
0
    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