Initial upload: DevDash CLI with TUI dashboard
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-01 06:53:05 +00:00
parent c589be622e
commit b21850572b

29
tests/test_config.py Normal file
View File

@@ -0,0 +1,29 @@
import pytest
import tempfile
import os
from pathlib import Path
from src.config.config_manager import ConfigManager
from src.config.settings import Settings
class TestConfigManager:
def test_load_config_default(self, tmp_path, monkeypatch):
config_file = tmp_path / "config.json"
monkeypatch.setenv("DEVDASH_CONFIG", str(config_file))
manager = ConfigManager()
config = manager.load_config()
assert config.refresh_interval == 30
assert config.theme == "dark"
def test_save_and_load_config(self, tmp_path, monkeypatch):
config_file = tmp_path / "config.json"
monkeypatch.setenv("DEVDASH_CONFIG", str(config_file))
manager = ConfigManager()
settings = Settings(
github_token="test_token",
refresh_interval=60,
)
manager.save_config(settings)
loaded = manager.load_config()
assert loaded.github_token == "test_token"
assert loaded.refresh_interval == 60