mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Use cached property from werkzeug.utils
This means we can have a method on the service model which hits the API (or Redis) but can be called multiple times (within the context of a request) without making multiple network requests. It does this by storing the results of the method on the object’s internal `__dict__` the first time the method is called.
This commit is contained in:
@@ -131,7 +131,7 @@ def test_should_show_page_for_choosing_a_template(
|
||||
for index, expected_template in enumerate(expected_templates):
|
||||
assert template_links[index].text.strip() == expected_template
|
||||
|
||||
mock_get_service_templates.assert_called_with(SERVICE_ONE_ID)
|
||||
mock_get_service_templates.assert_called_once_with(SERVICE_ONE_ID)
|
||||
|
||||
|
||||
def test_should_not_show_template_nav_if_only_one_type_of_template(
|
||||
|
||||
Reference in New Issue
Block a user