test: add configuration loading tests

- Add test_config.py with tests for load_settings function
- Add test_config.yaml fixture with test database configuration
- Tests cover: successful loading, file not found error, database URL generation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-05-12 09:36:30 +08:00
parent 7478b7176f
commit 2f73dd07b5
2 changed files with 35 additions and 0 deletions

10
tests/fixtures/test_config.yaml vendored Normal file
View File

@@ -0,0 +1,10 @@
# 测试配置
database:
sql_server:
host: localhost
port: 1433
database: TestDB
username: test_user
password: test_pass
driver: "{ODBC Driver 18 for SQL Server}"
trust_server_certificate: yes