Skip to content

Commit

Permalink
fix link creation test
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Jan 21, 2025
1 parent 391c331 commit 4d1dd97
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions tests/integration/study_data_blueprint/test_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def test_link_820(self, client: TestClient, user_access_token: str, study_type:
"lawForced": "uniform",
"lawPlanned": "uniform",
"forceNoGeneration": True,
"nominalCapacity": 0.0,
"unitCount": 1,
}
assert expected == res.json()
assert res.json() == expected
res = client.delete(f"/v1/studies/{study_id}/links/{area1_id}/{area2_id}")
res.raise_for_status()

Expand All @@ -223,6 +225,13 @@ def test_link_820(self, client: TestClient, user_access_token: str, study_type:
"loopFlow": False,
"transmissionCapacities": "enabled",
"usePhaseShifter": False,
"volatilityForced": 0.0,
"volatilityPlanned": 0.0,
"lawForced": "uniform",
"lawPlanned": "uniform",
"forceNoGeneration": True,
"nominalCapacity": 0.0,
"unitCount": 1,
}
res = client.post(
f"/v1/studies/{study_id}/links",
Expand Down Expand Up @@ -334,8 +343,15 @@ def test_link_820(self, client: TestClient, user_access_token: str, study_type:
"loopFlow": False,
"transmissionCapacities": "enabled",
"usePhaseShifter": False,
"volatilityForced": 0.0,
"volatilityPlanned": 0.0,
"lawForced": "uniform",
"lawPlanned": "uniform",
"forceNoGeneration": True,
"nominalCapacity": 0.0,
"unitCount": 1,
}
assert expected == res.json()
assert res.json() == expected

# Test create link with double value in filter

Expand Down Expand Up @@ -363,8 +379,15 @@ def test_link_820(self, client: TestClient, user_access_token: str, study_type:
"loopFlow": False,
"transmissionCapacities": "enabled",
"usePhaseShifter": False,
"volatilityForced": 0.0,
"volatilityPlanned": 0.0,
"lawForced": "uniform",
"lawPlanned": "uniform",
"forceNoGeneration": True,
"nominalCapacity": 0.0,
"unitCount": 1,
}
assert expected == res.json()
assert res.json() == expected

def test_create_link_810(self, client: TestClient, user_access_token: str) -> None:
client.headers = {"Authorization": f"Bearer {user_access_token}"} # type: ignore
Expand Down

0 comments on commit 4d1dd97

Please sign in to comment.