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()