Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): fix all chainlink #374

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/prices/test_chainlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ def test_chainlink_get_feed(token):
@pytest.mark.parametrize('token', FEEDS)
@pytest.mark.asyncio_cooperative
async def test_chainlink_latest(token):
assert await chainlink.get_price(token), 'no current price available'
if not await chainlink.get_price(token):
feed = await chainlink.get_feed(token)
assert await feed.aggregator.coroutine() == ZERO_ADDRESS, 'no current price available'


@mainnet_only
Expand All @@ -135,7 +137,9 @@ async def test_chainlink_before_registry(token):
if await contract_creation_block_async(feed.address) > test_block:
pytest.skip('not applicable to feeds deployed after test block')
price = await chainlink.get_price(token, block=test_block)
assert price, 'no price available before registry'
if not price:
feed = await chainlink.get_feed(token)
assert await feed.aggregator.coroutine() == ZERO_ADDRESS, 'no price available before registry'


def test_chainlink_nonexistent():
Expand Down
Loading