From b21850572b56ca20c4841ff33779f094919d3367 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Sun, 1 Feb 2026 06:53:05 +0000 Subject: [PATCH] Initial upload: DevDash CLI with TUI dashboard --- tests/test_config.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 tests/test_config.py diff --git a/tests/test_config.py b/tests/test_config.py new file mode 100644 index 0000000..584b293 --- /dev/null +++ b/tests/test_config.py @@ -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