Skip to content

Commit

Permalink
Unmock the MobilityDemandParser after the test_scenario_to_esdl_conve…
Browse files Browse the repository at this point in the history
…rter tests
  • Loading branch information
redekok committed May 4, 2023
1 parent e01c7d6 commit a8a4cd0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/models/test_scenario_to_esdl_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)

Expand Down

0 comments on commit a8a4cd0

Please sign in to comment.