Skip to content

Commit

Permalink
store CI key secret in separate env
Browse files Browse the repository at this point in the history
  • Loading branch information
chadsr committed May 27, 2024
1 parent db9933d commit 05e6cb4
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 @@ -18,6 +18,8 @@
read_config,
)

TEST_API_KEY_ENV = "TEST_CMC_API_KEY"
API_KEY = os.getenv(TEST_API_KEY_ENV)

TEST_CONFIG_PATH = "./config.ini.example"
TEST_API_KEY = "test_key"
Expand Down Expand Up @@ -244,6 +246,7 @@ def test_read_config_env():
class TestWaybarCrypto:
"""Tests for the WaybarCrypto."""

@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()
assert isinstance(resp_quotes_latest, dict)
Expand Down

0 comments on commit 05e6cb4

Please sign in to comment.