Skip to content

Commit

Permalink
update testset test_get_ashp_defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
zolanaj committed Sep 25, 2024
1 parent 77458ee commit d427d19
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions reoptjl/test/test_http_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,23 +380,28 @@ def test_default_existing_chiller_cop(self):

def test_get_ashp_defaults(self):
inputs_dict = {
"load_served": "SpaceHeating"
"load_served": "SpaceHeating",
"force_into_system": "true"
}

# Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint
resp = self.api_client.get(f'/v3/get_ashp_defaults', data=inputs_dict)
view_response = json.loads(resp.content)

self.assertEqual(view_response["installed_cost_per_ton"], 2250)
self.assertEqual(view_response["om_cost_per_ton"], 0.0)
self.assertEqual(view_response["sizing_factor"], 1.1)

inputs_dict = {
"load_served": "DomesticHotWater"
"load_served": "DomesticHotWater",
"force_into_system": "false"
}

# Call to the django view endpoint /get_existing_chiller_default_cop which calls the http.jl endpoint
resp = self.api_client.get(f'/v3/get_ashp_defaults', data=inputs_dict)
view_response = json.loads(resp.content)

self.assertNotIn("cooling_cf_reference", view_response.keys())
self.assertEqual(view_response["sizing_factor"], 1.0)


0 comments on commit d427d19

Please sign in to comment.