feat: Config 모듈 추가 (Notion 연동 포함)
Made-with: Cursor
This commit is contained in:
21
tests/test_config.py
Normal file
21
tests/test_config.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import os
|
||||
import pytest
|
||||
from src.config import Config
|
||||
|
||||
|
||||
def test_config_loads_symbol():
|
||||
os.environ["SYMBOL"] = "XRPUSDT"
|
||||
os.environ["LEVERAGE"] = "10"
|
||||
os.environ["RISK_PER_TRADE"] = "0.02"
|
||||
cfg = Config()
|
||||
assert cfg.symbol == "XRPUSDT"
|
||||
assert cfg.leverage == 10
|
||||
assert cfg.risk_per_trade == 0.02
|
||||
|
||||
|
||||
def test_config_notion_keys():
|
||||
os.environ["NOTION_TOKEN"] = "secret_test"
|
||||
os.environ["NOTION_DATABASE_ID"] = "db_test_id"
|
||||
cfg = Config()
|
||||
assert cfg.notion_token == "secret_test"
|
||||
assert cfg.notion_database_id == "db_test_id"
|
||||
Reference in New Issue
Block a user