Merge pull request #3624 from moodyjon/test_fix_exch_rate1

Fixes for intermittent test failures: test_exchange_rate_manager(), test_basic_claim_search()
This commit is contained in:
Victor Shyba 2022-07-01 17:29:44 -03:00 committed by GitHub
commit 87b4404767
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -208,7 +208,7 @@ class ClaimSearchCommand(ClaimTestCase):
# resolve by sd hash # resolve by sd hash
two_sd_hash = two['outputs'][0]['value']['source']['sd_hash'] two_sd_hash = two['outputs'][0]['value']['source']['sd_hash']
await self.assertFindsClaims([two], sd_hash=two_sd_hash) await self.assertFindsClaims([two], sd_hash=two_sd_hash)
await self.assertFindsClaims([two], sd_hash=two_sd_hash[:2]) await self.assertFindsClaims([two], sd_hash=two_sd_hash[:4])
async def test_source_filter(self): async def test_source_filter(self):
channel = await self.channel_create('@abc') channel = await self.channel_create('@abc')

View file

@ -24,7 +24,7 @@ class TestExchangeRateManager(AsyncioTestCase):
self.assertLessEqual(len(failures), 1, f"feed failures: {failures}. Please check exchange rate feeds!") self.assertLessEqual(len(failures), 1, f"feed failures: {failures}. Please check exchange rate feeds!")
lbc = manager.convert_currency('USD', 'LBC', Decimal('1.0')) lbc = manager.convert_currency('USD', 'LBC', Decimal('1.0'))
self.assertGreaterEqual(lbc, 2.0) self.assertGreaterEqual(lbc, 2.0)
self.assertLessEqual(lbc, 80.0) self.assertLessEqual(lbc, 120.0)
lbc = manager.convert_currency('BTC', 'LBC', Decimal('0.01')) lbc = manager.convert_currency('BTC', 'LBC', Decimal('0.01'))
self.assertGreaterEqual(lbc, 1_000) self.assertGreaterEqual(lbc, 1_000)
self.assertLessEqual(lbc, 30_000) self.assertLessEqual(lbc, 30_000)