mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-04-19 08:55:15 +00:00
Remove potentially unexpected config update
This commit is contained in:
parent
94618f5f66
commit
da4994ca39
@ -244,7 +244,6 @@ class EnergieManagementSystem(SingletonMixin, ConfigMixin, PredictionMixin, Pyda
|
|||||||
force_update (bool, optional): If True, forces to update the data even if still cached.
|
force_update (bool, optional): If True, forces to update the data even if still cached.
|
||||||
"""
|
"""
|
||||||
self.set_start_hour(start_hour=start_hour)
|
self.set_start_hour(start_hour=start_hour)
|
||||||
self.config.update()
|
|
||||||
|
|
||||||
# Check for run definitions
|
# Check for run definitions
|
||||||
if self.start_datetime is None:
|
if self.start_datetime is None:
|
||||||
|
@ -206,9 +206,6 @@ class PredictionProvider(PredictionStartEndKeepMixin, DataProvider):
|
|||||||
force_enable (bool, optional): If True, forces the update even if the provider is disabled.
|
force_enable (bool, optional): If True, forces the update even if the provider is disabled.
|
||||||
force_update (bool, optional): If True, forces the provider to update the data even if still cached.
|
force_update (bool, optional): If True, forces the provider to update the data even if still cached.
|
||||||
"""
|
"""
|
||||||
# Update prediction configuration
|
|
||||||
self.config.update()
|
|
||||||
|
|
||||||
# Check after configuration is updated.
|
# Check after configuration is updated.
|
||||||
if not force_enable and not self.enabled():
|
if not force_enable and not self.enabled():
|
||||||
return
|
return
|
||||||
|
@ -116,7 +116,6 @@ class TestDataBase:
|
|||||||
def base(self):
|
def base(self):
|
||||||
# Provide default values for configuration
|
# Provide default values for configuration
|
||||||
derived = DerivedBase()
|
derived = DerivedBase()
|
||||||
derived.config.update()
|
|
||||||
return derived
|
return derived
|
||||||
|
|
||||||
def test_get_config_value_key_error(self, base):
|
def test_get_config_value_key_error(self, base):
|
||||||
|
@ -88,9 +88,6 @@ def test_request_forecast(mock_get, provider, sample_akkudoktor_1_json):
|
|||||||
mock_response.content = json.dumps(sample_akkudoktor_1_json)
|
mock_response.content = json.dumps(sample_akkudoktor_1_json)
|
||||||
mock_get.return_value = mock_response
|
mock_get.return_value = mock_response
|
||||||
|
|
||||||
# Preset, as this is usually done by update()
|
|
||||||
provider.config.update()
|
|
||||||
|
|
||||||
# Test function
|
# Test function
|
||||||
akkudoktor_data = provider._request_forecast()
|
akkudoktor_data = provider._request_forecast()
|
||||||
|
|
||||||
|
@ -107,9 +107,6 @@ def test_request_forecast(mock_get, provider, sample_brightsky_1_json):
|
|||||||
mock_response.content = json.dumps(sample_brightsky_1_json)
|
mock_response.content = json.dumps(sample_brightsky_1_json)
|
||||||
mock_get.return_value = mock_response
|
mock_get.return_value = mock_response
|
||||||
|
|
||||||
# Preset, as this is usually done by update()
|
|
||||||
provider.config.update()
|
|
||||||
|
|
||||||
# Test function
|
# Test function
|
||||||
brightsky_data = provider._request_forecast()
|
brightsky_data = provider._request_forecast()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user