Skip to content

Commit

Permalink
skip test_get_coinmarketcap_latest if no test key provided
Browse files Browse the repository at this point in the history
  • Loading branch information
chadsr committed May 27, 2024
1 parent 05e6cb4 commit 785cd51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_waybar_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ def test_read_config_env():
class TestWaybarCrypto:
"""Tests for the WaybarCrypto."""

@pytest.mark.skipif(
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):
resp_quotes_latest = waybar_crypto.coinmarketcap_latest()
Expand Down

0 comments on commit 785cd51

Please sign in to comment.