From a2da6696dec1f1613147cceb5dcc7411383bff03 Mon Sep 17 00:00:00 2001 From: redekok Date: Mon, 3 Apr 2023 11:30:19 +0200 Subject: [PATCH] Unmock the MobilityDemandParser after the test_scenario_to_esdl_converter tests --- tests/models/test_scenario_to_esdl_converter.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/models/test_scenario_to_esdl_converter.py b/tests/models/test_scenario_to_esdl_converter.py index 36765dc..c39039c 100644 --- a/tests/models/test_scenario_to_esdl_converter.py +++ b/tests/models/test_scenario_to_esdl_converter.py @@ -23,9 +23,14 @@ def energy_system_handler(): @pytest.fixture def mocking_parsers(): - '''Currently only mocks CostsParser''' + """ + Currently only mocks CostsParser and MobilityDemandParser + + TODO: Beautify this + """ with patch("app.models.parsers.CostsParser.update", new=MagicMock(return_value=None)): - yield + with patch("app.models.parsers.MobilityDemandParser.update", new=MagicMock(return_value=None)): + yield @pytest.mark.usefixtures("mocking_parsers") def test_update_esdl(energy_system_handler): @@ -34,7 +39,6 @@ def test_update_esdl(energy_system_handler): KPIHandler.update = MagicMock(return_value=None) VolatileParser.update = MagicMock(return_value=None) FlexibilityParser.update = MagicMock(return_value=None) - MobilityDemandParser.update = MagicMock(return_value=None) esh = update_esdl(energy_system_handler, 123456, None)