Skip to content

Commit

Permalink
fix: called_once_with should be assert_called_once_with
Browse files Browse the repository at this point in the history
Signed-off-by: F.N. Claessen <[email protected]>
  • Loading branch information
Flix6x committed Nov 6, 2024
1 parent e72d51a commit 2669a3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flexmeasures/ui/tests/test_assets_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_with_price_sensors(
return_value=allowed_price_sensor_data,
) as mock_method:
form.with_price_sensors(new_asset_decorator.test_battery, 1)
assert mock_method.called_once_with(1)
assert mock_method.assert_called_once_with(1)
# check production_price_sensor only as consumption_price is processed the same way
assert form.production_price_sensor_id.choices == expect_choices
assert form.production_price_sensor_id.default == expect_default
Expand Down Expand Up @@ -155,6 +155,6 @@ def test_with_inflexible_sensors(
return_value=allowed_inflexible_sensor_data,
) as mock_method:
form.with_inflexible_sensors(new_asset_decorator.test_battery, 1)
assert mock_method.called_once_with(1)
assert mock_method.assert_called_once_with(1)
assert form.inflexible_device_sensor_ids.choices == expect_choices
assert form.inflexible_device_sensor_ids.default == expect_default

0 comments on commit 2669a3b

Please sign in to comment.