Refactor test cases for improved readability and consistency
- Updated test functions in various test files to enhance code clarity by formatting long lines and improving indentation. - Adjusted assertions to use multi-line formatting for better readability. - Added new test cases for theme settings API to ensure proper functionality. - Ensured consistent use of line breaks and spacing across test files for uniformity.
This commit is contained in:
@@ -27,7 +27,7 @@ def test_parameter_create_missing_scenario_returns_404(
|
||||
|
||||
@pytest.mark.usefixtures("invalid_request_payloads")
|
||||
def test_parameter_create_invalid_distribution_is_422(
|
||||
api_client: TestClient
|
||||
api_client: TestClient,
|
||||
) -> None:
|
||||
response = api_client.post(
|
||||
"/api/parameters/",
|
||||
@@ -90,6 +90,5 @@ def test_maintenance_negative_cost_rejected_by_schema(
|
||||
payload = invalid_request_payloads["maintenance_negative_cost"]
|
||||
response = api_client.post("/api/maintenance/", json=payload)
|
||||
assert response.status_code == 422
|
||||
error_locations = [tuple(item["loc"])
|
||||
for item in response.json()["detail"]]
|
||||
error_locations = [tuple(item["loc"]) for item in response.json()["detail"]]
|
||||
assert ("body", "cost") in error_locations
|
||||
|
||||
Reference in New Issue
Block a user