style: format and lint code

This commit is contained in:
2026-03-18 14:03:20 +08:00
parent f1a75cab8c
commit d88cedc8a0

View File

@@ -40,7 +40,7 @@ def test_get_server_config_success():
"work": {
"url": "https://jenkins.example.com",
"username": "user",
"password": "pass"
"password": "pass",
}
}
result = get_server_config(config, "work")
@@ -53,7 +53,7 @@ def test_get_server_config_not_found():
"work": {
"url": "https://jenkins.example.com",
"username": "user",
"password": "pass"
"password": "pass",
}
}
with pytest.raises(ConfigError) as exc_info:
@@ -64,12 +64,7 @@ def test_get_server_config_not_found():
def test_get_server_config_missing_field():
"""Test error when required field is missing."""
config = {
"incomplete": {
"url": "https://jenkins.example.com",
"username": "user"
}
}
config = {"incomplete": {"url": "https://jenkins.example.com", "username": "user"}}
with pytest.raises(ConfigError) as exc_info:
get_server_config(config, "incomplete")
assert "password" in str(exc_info.value)