forked from LBRYCommunity/lbry-sdk
fix
This commit is contained in:
parent
77e19ab1a4
commit
f309a65cb4
1 changed files with 2 additions and 2 deletions
|
@ -4,9 +4,9 @@ from lbry.extras.daemon.exchange_rate_manager import ExchangeRate, ExchangeRateM
|
||||||
|
|
||||||
|
|
||||||
class TestExchangeRateManager(AsyncioTestCase):
|
class TestExchangeRateManager(AsyncioTestCase):
|
||||||
|
|
||||||
async def test_exchange_rate_manager(self):
|
async def test_exchange_rate_manager(self):
|
||||||
# TODO: re-enable cryptonator.com
|
# TODO: re-enable cryptonator.com
|
||||||
|
# TODO: this uses real exchange rate feeds... update to use mocks
|
||||||
manager = ExchangeRateManager(FEEDS)
|
manager = ExchangeRateManager(FEEDS)
|
||||||
manager.start()
|
manager.start()
|
||||||
self.addCleanup(manager.stop)
|
self.addCleanup(manager.stop)
|
||||||
|
@ -18,5 +18,5 @@ class TestExchangeRateManager(AsyncioTestCase):
|
||||||
self.assertTrue(feed.is_online)
|
self.assertTrue(feed.is_online)
|
||||||
self.assertIsInstance(feed.rate, ExchangeRate)
|
self.assertIsInstance(feed.rate, ExchangeRate)
|
||||||
lbc = manager.convert_currency('USD', 'LBC', Decimal('0.01'))
|
lbc = manager.convert_currency('USD', 'LBC', Decimal('0.01'))
|
||||||
self.assertGreaterEqual(lbc, 0.1)
|
self.assertGreaterEqual(lbc, 0.01)
|
||||||
self.assertLessEqual(lbc, 10.0)
|
self.assertLessEqual(lbc, 10.0)
|
||||||
|
|
Loading…
Reference in a new issue