Skip to content

Commit

Permalink
Remove some redundant print statements and slightly clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
redekok committed May 4, 2023
1 parent 4cd4bab commit e01c7d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions app/models/parsers/demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ def query_scenario(self, scenario_id, prop):
query_result = QueryScenario.execute(scenario_id, prop['gquery'])

if query_result.successful:
print('query_result.value', query_result.value)
print('prop["gquery"]', prop['gquery'])
return query_result.value[prop['gquery']]['future'] / prop['factor']

raise ETMParseError(
Expand Down
12 changes: 2 additions & 10 deletions tests/models/parsers/test_demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@ def test_parse_with_mobility_demand(esh_with_mobility_demand, app, requests_mock
assert len(mobility_demands) > 0

first_mobility_demand = mobility_demands[0]
second_mobility_demand = mobility_demands[1]

# Check the power and FLH before updating the attributes
power_before_update = first_mobility_demand.power
flh_before_update = first_mobility_demand.fullLoadHours

# Call the update method
with app.app_context():
Expand All @@ -94,11 +89,8 @@ def test_parse_with_mobility_demand(esh_with_mobility_demand, app, requests_mock
# TODO

# Check if the power has been updated for the first asset
power_after_update = first_mobility_demand.power
assert power_before_update != power_after_update
assert first_mobility_demand.power == 100.e6

# Check if the number of FLH has been updated and if it has been
# set to 8760 for the first asset
flh_after_update = first_mobility_demand.fullLoadHours
assert flh_before_update != flh_after_update
assert flh_after_update == 8760
assert first_mobility_demand.fullLoadHours == 8760

0 comments on commit e01c7d6

Please sign in to comment.