style: format and lint code
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user