From 40fe3b38337d01ed323120a0f5951becef510ecb Mon Sep 17 00:00:00 2001 From: Google AI Agent Date: Sun, 5 Apr 2026 17:59:17 +0000 Subject: [PATCH] Add/Update tests/test_config.py by Wolf --- tests/test_config.py | 21 +++++++++++++++++++++ 1 file changed, 21 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..0da25c2 --- /dev/null +++ b/tests/test_config.py @@ -0,0 +1,21 @@ +import unittest +from pathlib import Path +from wolf.config import Config + +class TestConfig(unittest.TestCase): + def test_config_load(self): + # Create a temporary config file + config_path = Path("test-config.yaml") + with open(config_path, "w") as f: + f.write("gitea_url: http://localhost:3000\n") + f.write("token: test-token\n") + + config = Config(config_path) + self.assertEqual(config.get("gitea_url"), "http://localhost:3000") + self.assertEqual(config.get("token"), "test-token") + + # Cleanup + config_path.unlink() + +if __name__ == "__main__": + unittest.main()