Skip to content

Commit

Permalink
Merge pull request #412 from UKGovernmentBEIS/develop
Browse files Browse the repository at this point in the history
develop -> staging
  • Loading branch information
samyou-softwire authored Dec 16, 2024
2 parents 5fcd4e7 + fbb2380 commit f775ecd
Show file tree
Hide file tree
Showing 14 changed files with 747 additions and 474 deletions.
47 changes: 27 additions & 20 deletions help_to_heat/frontdoor/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,33 +143,40 @@
park_home_main_residence_field = "park_home_main_residence"
# yes/no options

address_choice_field = "address_choice"
address_choice_field_write_address = "write address"
address_choice_field_epc_api_fail = "epc api fail"
address_choice_field_enter_manually = "enter manually"
address_building_name_or_number_field = "building_name_or_number"
address_postcode_field = "postcode"
address_all_address_and_lmk_details_field = "address_and_lmk_details"

epc_select_choice_field = "epc_select_choice"
epc_select_choice_field_select_epc = "select epc"
epc_select_choice_field_epc_api_fail = "epc api fail"
epc_select_choice_field_enter_manually = "enter manually"

address_select_choice_field = "address_select_choice"
address_select_choice_field_select_address = "select address"
address_select_choice_field_enter_manually = "enter manually"

referral_already_submitted_field = "submit_another"
# this const was renamed to no longer include lmk.
# this is as this field stores info from both flows (lmk & uprn)
# the field value is left as is to preserve backwards compatibility
address_all_address_and_details_field = "address_and_lmk_details"

# journey fields are calculated based on user input & other factors, and decide where the user should go next
# they are stored in the users' session to record the result of these checks, to make journey calculation reproducible
address_choice_journey_field = "address_choice"
address_choice_journey_field_write_address = "write address"
address_choice_journey_field_epc_api_fail = "epc api fail"
address_choice_journey_field_enter_manually = "enter manually"
address_no_results_journey_field = "no_results" # yes/no options

epc_select_choice_journey_field = "epc_select_choice"
epc_select_choice_journey_field_select_epc = "select epc"
epc_select_choice_journey_field_epc_api_fail = "epc api fail"
epc_select_choice_journey_field_enter_manually = "enter manually"

address_select_choice_journey_field = "address_select_choice"
address_select_choice_journey_field_select_address = "select address"
address_select_choice_journey_field_enter_manually = "enter manually"

referral_already_submitted_journey_field = "submit_another"

address_manual_address_line_1_field = "address_line_1"
address_manual_address_line_2_field = "address_line_2"
address_manual_town_or_city_field = "town_or_city"
address_manual_county_field = "county"
address_manual_postcode_field = "postcode"

duplicate_uprn_field = "uprn_is_duplicate"
epc_found_field = "epc_found"
duplicate_uprn_journey_field = "uprn_is_duplicate" # yes/no options
epc_found_journey_field = "epc_found" # yes/no options
lmk_field = "lmk"
lmk_field_enter_manually = "enter-manually"
address_field = "address"
Expand Down Expand Up @@ -205,9 +212,9 @@
epc_accept_suggested_epc_field_not_found = "Not found"
epc_rating_field = "epc_rating"
epc_rating_field_not_found = "Not found"
epc_rating_is_eligible_field = "epc_rating_is_eligible"
epc_rating_is_eligible_field = "epc_rating_is_eligible" # yes/no options

no_epc_field = "confirm_no_epc"
no_epc_field = "confirm_no_epc" # yes/no options

benefits_field = "benefits"

Expand Down
5 changes: 5 additions & 0 deletions help_to_heat/frontdoor/mock_epc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ def get_epc_recommendations(self, lmk_key):
return load_test_reponse("sample_epc_recommendations_response.json")


class MockEPCApiWithMultipleEPC(MockEPCApi):
def search_epc_details(self, building, postcode):
return load_test_reponse("sample_search_response_with_multiple_epc.json")


class MockEPCApiWithEPCC(MockEPCApi):
def get_epc_details(self, rrn):
epc = load_test_reponse("sample_epc_response.json")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,100 +281,6 @@
"low-energy-lighting": "0",
"walls-description": "Sandstone, as built, no insulation (assumed)",
"hotwater-description": "Electric immersion, standard tariff"
},
{
"low-energy-fixed-light-count": "",
"address": "22 Acacia Avenue, Upper Wellgood, Fulchester, FL23 4JA",
"uprn-source": "Address Matched",
"floor-height": "2.833",
"heating-cost-potential": "1100",
"unheated-corridor-length": "2.05",
"hot-water-cost-potential": "166",
"construction-age-band": "England and Wales: before 1900",
"potential-energy-rating": "F",
"mainheat-energy-eff": "Very Poor",
"windows-env-eff": "Average",
"lighting-energy-eff": "Very Poor",
"environment-impact-potential": "28",
"glazed-type": "double glazing, unknown install date",
"heating-cost-current": "1916",
"address3": "",
"mainheatcont-description": "Programmer and appliance thermostats",
"sheating-energy-eff": "N/A",
"property-type": "Maisonette",
"local-authority-label": "Westminster",
"fixed-lighting-outlets-count": "",
"energy-tariff": "Unknown",
"mechanical-ventilation": "natural",
"hot-water-cost-current": "365",
"county": "Greater London Authority",
"postcode": "FL23 4JA",
"solar-water-heating-flag": "N",
"constituency": "E14000639",
"co2-emissions-potential": "9.9",
"number-heated-rooms": "3",
"floor-description": "(other premises below)",
"energy-consumption-potential": "602",
"local-authority": "E09000033",
"built-form": "NO DATA!",
"number-open-fireplaces": "0",
"windows-description": "Fully double glazed",
"glazed-area": "Normal",
"inspection-date": "2010-07-20",
"mains-gas-flag": "N",
"co2-emiss-curr-per-floor-area": "81",
"address1": "22 Acacia Avenue",
"heat-loss-corridor": "unheated corridor",
"flat-storey-count": "5.0",
"constituency-label": "Cities of London and Westminster",
"roof-energy-eff": "Very Poor",
"total-floor-area": "109.021",
"building-reference-number": "8502528768",
"environment-impact-current": "33",
"co2-emissions-current": "8.8",
"roof-description": "Pitched, no insulation (assumed)",
"floor-energy-eff": "N/A",
"number-habitable-rooms": "3",
"address2": "Upper Wellgood",
"hot-water-env-eff": "Poor",
"posttown": "Fulchester",
"mainheatc-energy-eff": "Good",
"main-fuel": "electricity - this is for backwards compatibility only and should not be used",
"lighting-env-eff": "Very Poor",
"windows-energy-eff": "Average",
"floor-env-eff": "N/A",
"sheating-env-eff": "N/A",
"lighting-description": "No low energy lighting",
"roof-env-eff": "Very Poor",
"walls-energy-eff": "Very Poor",
"photo-supply": "0.0",
"lighting-cost-potential": "136",
"mainheat-env-eff": "Poor",
"multi-glaze-proportion": "100",
"main-heating-controls": "2603",
"lodgement-datetime": "2010-07-20 16:38:12",
"flat-top-storey": "Y",
"current-energy-rating": "G",
"secondheat-description": "None",
"walls-env-eff": "Very Poor",
"transaction-type": "rental (private)",
"uprn": "001234567890",
"current-energy-efficiency": "8",
"energy-consumption-current": "538",
"mainheat-description": "Room heaters, electric",
"lighting-cost-current": "121",
"lodgement-date": "2010-07-20",
"extension-count": "0",
"mainheatc-env-eff": "Good",
"lmk-key": "333333333333333333333333333333333",
"wind-turbine-count": "0",
"tenure": "rental (private)",
"floor-level": "3rd",
"potential-energy-efficiency": "35",
"hot-water-energy-eff": "Very Poor",
"low-energy-lighting": "0",
"walls-description": "Sandstone, as built, no insulation (assumed)",
"hotwater-description": "Electric immersion, standard tariff"
}
]
}
Loading

0 comments on commit f775ecd

Please sign in to comment.