Exclude grouped areas from examples

The given examples should match the choices offered when you visit the
next page. The choices offered on the next page are either the areas
(when a library is not grouped) or the groups (when a library is
grouped).

This commit makes the examples match the choices by excluding sub-areas,
ie those that have a grouping ID.
This commit is contained in:
Chris Hill-Scott
2020-08-12 12:02:56 +01:00
parent 781847d32c
commit 53fd5b8869
2 changed files with 6 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ def test_examples():
wards = broadcast_area_libraries.get(
'electoral-wards-of-the-united-kingdom',
).get_examples()
assert wards == 'Abbey, Alibon, Becontree, Chadwell Heath, and 8970 more…'
assert wards == 'Hartlepool, Middlesbrough, Redcar and Cleveland, Stockton-on-Tees, and 375 more…'
@pytest.mark.parametrize('id', (