Skip to content

Commit

Permalink
feat(sensor): test if database changed after patch
Browse files Browse the repository at this point in the history
Signed-off-by: GustaafL <guus@seita.nl>
  • Loading branch information
GustaafL committed Aug 1, 2023
1 parent ddc9c78 commit 559593e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flexmeasures/api/v3_0/tests/test_sensors_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ def test_patch_sensor(client, setup_api_test_data):
},
)
assert response.json["name"] == "Changed name"
new_sensor = Sensor.query.filter(Sensor.name == "Changed name").one_or_none()
assert new_sensor.name == "Changed name"
assert Sensor.query.filter(Sensor.name == "some gas sensor").one_or_none() is None


def test_patch_sensor_for_excluded_attribute(client, setup_api_test_data):
Expand Down

0 comments on commit 559593e

Please sign in to comment.