Skip to content

Commit

Permalink
test(api-thermal): update thermal manager tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hdinia committed Jan 24, 2024
1 parent 5965ca5 commit 221b2a8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/integration/study_data_blueprint/test_thermal.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def test_lifecycle(
)
assert res.status_code == 200, res.json()
fr_gas_conventional_id = res.json()["id"]
assert fr_gas_conventional_id == transform_name_to_id(fr_gas_conventional, lower=False)
assert fr_gas_conventional_id == transform_name_to_id(fr_gas_conventional, lower=True)
# noinspection SpellCheckingInspection
fr_gas_conventional_cfg = {
**fr_gas_conventional_props,
Expand All @@ -443,6 +443,17 @@ def test_lifecycle(
}
assert res.json() == fr_gas_conventional_cfg

# Check for duplicate thermal cluster
res = client.post(
f"/v1/studies/{study_id}/areas/{area_id}/clusters/thermal",
headers={"Authorization": f"Bearer {user_access_token}"},
json=fr_gas_conventional_props,
)
assert res.json() == {
"description": f"Thermal cluster '{fr_gas_conventional_id}' already exists in the area '{area_id}'.",
"exception": "CommandApplicationError",
}

# reading the properties of a thermal cluster
res = client.get(
f"/v1/studies/{study_id}/areas/{area_id}/clusters/thermal/{fr_gas_conventional_id}",
Expand Down

0 comments on commit 221b2a8

Please sign in to comment.