test_config.py 466 B

1234567891011121314151617
  1. import pytest
  2. import okx_codex_trader
  3. from okx_codex_trader.config import load_config
  4. def test_package_exports_version():
  5. assert okx_codex_trader.__version__ == "0.1.0"
  6. def test_load_config_requires_okx_credentials(monkeypatch):
  7. monkeypatch.delenv("OKX_API_KEY", raising=False)
  8. monkeypatch.delenv("OKX_API_SECRET", raising=False)
  9. monkeypatch.delenv("OKX_API_PASSPHRASE", raising=False)
  10. with pytest.raises(ValueError):
  11. load_config()