assert instead of sleep

This commit is contained in:
Victor Shyba 2021-05-07 14:38:52 -03:00 committed by Victor Shyba
parent 45f20431f9
commit 9582e228b1

View file

@ -64,7 +64,10 @@ class ExchangeRateManagerTests(AsyncioTestCase):
async def test_get_rate_failure_retrieved(self):
manager = ExchangeRateManager([BadMarketFeed])
manager.start()
await asyncio.sleep(1)
await manager.wait()
for feed in manager.market_feeds: # no rate but it tried
self.assertFalse(feed.has_rate)
self.assertTrue(feed.event.is_set())
self.addCleanup(manager.stop)
async def test_median_rate_used(self):