Skip to content

Commit

Permalink
test: fix loading of env api key secret (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
chadsr committed May 27, 2024
1 parent c449c87 commit bef2694
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_waybar_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
if API_KEY is None:
LOGGER.warning("No test API key provided. Skipping API tests")


TEST_CONFIG_PATH = "./config.ini.example"
TEST_API_KEY = "test_key"

Expand Down Expand Up @@ -258,7 +257,9 @@ class TestWaybarCrypto:
API_KEY is None, reason=f"test API key not provided in '{TEST_API_KEY_ENV}'"
)
@mock.patch.dict(os.environ, {API_KEY_ENV: API_KEY})
def test_get_coinmarketcap_latest(self, waybar_crypto: WaybarCrypto):
def test_get_coinmarketcap_latest(self):
config = read_config(TEST_CONFIG_PATH)
waybar_crypto = WaybarCrypto(config)
resp_quotes_latest = waybar_crypto.coinmarketcap_latest()
assert isinstance(resp_quotes_latest, dict)

Expand Down

0 comments on commit bef2694

Please sign in to comment.