def test_address_builder_given_house_number_style_address_returns_address(): lpi_info = {'PAO_START_NUMBER': 12, 'STREET_DESCRIPTION': 'Church Lane'} address = address_builder(lpi_info) assert address['building_and_street_line_1'] == '12 Church Lane' assert address['building_and_street_line_2'] == ''
def test_address_builder_given_house_name_and_number_address_returns_address(): lpi_info = { 'PAO_START_NUMBER': '12', 'PAO_TEXT': 'The Vicarage', 'STREET_DESCRIPTION': 'Church Lane' } address = address_builder(lpi_info) assert address['building_and_street_line_1'] == 'The Vicarage, 12' assert address['building_and_street_line_2'] == 'Church Lane'
def test_address_builder_given_org_name_is_short_optimises_line_length(): lpi_info = { 'ORGANISATION': 'Gds', 'PAO_TEXT': 'Aviation House', 'STREET_DESCRIPTION': 'Holborn', } address = address_builder(lpi_info) assert address['building_and_street_line_1'] == 'Gds, Aviation House' assert address['building_and_street_line_2'] == 'Holborn'
def test_address_builder_given_secondary_style_address_returns_address(): lpi_info = { 'SAO_START_NUMBER': 12, 'PAO_TEXT': 'Sussex Court', 'STREET_DESCRIPTION': 'Church Lane' } address = address_builder(lpi_info) assert address['building_and_street_line_1'] == '12, Sussex Court' assert address['building_and_street_line_2'] == 'Church Lane'
def test_address_builder_given_one_line_address_and_org_returns_org_as_line_1( ): lpi_info = { 'ORGANISATION': 'Sunset Care', 'PAO_START_NUMBER': 1, 'STREET_DESCRIPTION': 'Church Lane', } address = address_builder(lpi_info) assert address['building_and_street_line_1'] == 'Sunset Care' assert address['building_and_street_line_2'] == '1 Church Lane'
def test_address_builder_given_house_name_address_returns_address(): # GIVEN lpi_info = { 'PAO_TEXT': 'The Vicarage', 'STREET_DESCRIPTION': 'Church Lane' } # WHEN address = address_builder(lpi_info) # THEN assert address['building_and_street_line_1'] == 'The Vicarage' assert address['building_and_street_line_2'] == 'Church Lane'