Add/Update tests/test_config.py by Wolf

This commit is contained in:
2026-04-05 17:59:17 +00:00
parent a7286c5755
commit 40fe3b3833

21
tests/test_config.py Normal file
View File

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