Skip to content

Commit

Permalink
tox change
Browse files Browse the repository at this point in the history
  • Loading branch information
akremstudy committed Jul 24, 2023
1 parent 2815b2c commit 627385e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/telliot_feeds/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
from typing import Any
from typing import Callable
from typing import Dict
from typing import cast
from typing import Dict
from typing import get_args
from typing import get_type_hints
from typing import Optional
Expand Down Expand Up @@ -478,6 +478,8 @@ async def call_oracle(
except ValueError as e:
if "no gas strategy selected" in str(e):
click.echo("Can't set gas fees automatically. Please specify gas fees manually.")


class CustomHexBytes(HexBytes):
"""Wrapper around HexBytes that doesn't accept int or bool"""

Expand Down
5 changes: 3 additions & 2 deletions tests/cli/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
from unittest import mock

import pytest
from hexbytes import HexBytes

from telliot_feeds.cli.utils import build_query
from telliot_feeds.cli.utils import call_oracle
from hexbytes import HexBytes

from telliot_feeds.cli.utils import CustomHexBytes
from telliot_feeds.queries.abi_query import AbiQuery
from telliot_feeds.queries.price.spot_price import SpotPrice
Expand Down Expand Up @@ -83,6 +82,8 @@ def __init__(self):
user_inputs=user_inputs,
)
assert "withdrawStake transaction succeeded" in caplog.text


def test_custom_hexbytes_wrapper():
"""Test custom hexbytes wrapper."""
# test when 0x is present and not present
Expand Down

0 comments on commit 627385e

Please sign in to comment.