20 lines
445 B
Python
20 lines
445 B
Python
"""配置模块单元测试"""
|
|
|
|
from src.config import load_config
|
|
|
|
|
|
class TestLoadConfig:
|
|
"""配置加载"""
|
|
|
|
def test_returns_dict(self) -> None:
|
|
config = load_config()
|
|
assert isinstance(config, dict)
|
|
|
|
def test_has_username(self) -> None:
|
|
config = load_config()
|
|
assert "username" in config
|
|
|
|
def test_has_password(self) -> None:
|
|
config = load_config()
|
|
assert "password" in config
|