This commit is contained in:
Jack Robison 2021-01-01 14:14:08 -05:00
parent 77e19ab1a4
commit f309a65cb4
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -4,9 +4,9 @@ from lbry.extras.daemon.exchange_rate_manager import ExchangeRate, ExchangeRateM
class TestExchangeRateManager(AsyncioTestCase):
async def test_exchange_rate_manager(self):
# TODO: re-enable cryptonator.com
# TODO: this uses real exchange rate feeds... update to use mocks
manager = ExchangeRateManager(FEEDS)
manager.start()
self.addCleanup(manager.stop)
@ -18,5 +18,5 @@ class TestExchangeRateManager(AsyncioTestCase):
self.assertTrue(feed.is_online)
self.assertIsInstance(feed.rate, ExchangeRate)
lbc = manager.convert_currency('USD', 'LBC', Decimal('0.01'))
self.assertGreaterEqual(lbc, 0.1)
self.assertGreaterEqual(lbc, 0.01)
self.assertLessEqual(lbc, 10.0)