generate library summary in python

much simpler than sqlite.

also remove oxford commas

Co-authored-by: Chris Hill-Scott <me@quis.cc>
This commit is contained in:
Leo Hemsted
2020-09-09 17:35:17 +01:00
parent 54e553aad4
commit ef0564f046
4 changed files with 13 additions and 35 deletions

View File

@@ -38,10 +38,10 @@ def test_loads_areas_from_library():
def test_examples():
countries = broadcast_area_libraries.get('ctry19').get_examples()
assert countries == 'England, Northern Ireland, Scotland, and Wales'
assert countries == 'England, Northern Ireland, Scotland and Wales'
wards = broadcast_area_libraries.get('wd20-lad20-ctyua19').get_examples()
assert wards == 'Aberdeen City, Aberdeenshire, Angus, and 213 more…'
assert wards == 'Aberdeen City, Aberdeenshire, Adur and 391 more…'
@pytest.mark.parametrize('id', (

View File

@@ -378,7 +378,7 @@ def test_choose_broadcast_library_page(
]
assert normalize_spaces(page.select('.file-list-hint-large')[0].text) == (
'England, Northern Ireland, Scotland, and Wales'
'England, Northern Ireland, Scotland and Wales'
)
assert page.select_one('a.file-list-filename-large.govuk-link')['href'] == url_for(