mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 22:13:11 -04:00
Add library of test areas
This is a temporary addition so we can test out some functionality.
This commit is contained in:
@@ -24,6 +24,11 @@ def test_loads_libraries():
|
||||
'Local authorities',
|
||||
True,
|
||||
),
|
||||
(
|
||||
'test',
|
||||
'Test areas',
|
||||
False,
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
@@ -146,9 +151,10 @@ def test_repository_has_all_libraries():
|
||||
repo = BroadcastAreasRepository()
|
||||
libraries = repo.get_libraries()
|
||||
|
||||
assert len(libraries) == 2
|
||||
assert len(libraries) == 3
|
||||
assert [
|
||||
('Countries', 'country'),
|
||||
('Test areas', 'test area'),
|
||||
('Local authorities', 'local authority'),
|
||||
] == [(name, name_singular) for _, name, name_singular, _is_group in libraries]
|
||||
|
||||
@@ -158,7 +164,10 @@ def test_repository_has_all_libraries():
|
||||
))
|
||||
def test_every_area_has_count_of_phones(library):
|
||||
for area in library:
|
||||
assert area.count_of_phones > 0
|
||||
if library.id == 'test':
|
||||
assert area.count_of_phones == 0
|
||||
else:
|
||||
assert area.count_of_phones > 0
|
||||
|
||||
|
||||
@pytest.mark.parametrize('area_id, area_name, expected_count', (
|
||||
|
||||
Reference in New Issue
Block a user