mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 10:28:41 -04:00
Normalize whitespace in test arguments
We have a bunch of different styles of handling when function definitions span multiple lines, which they almost always do with tests. Here’s why an argument per line, single indent is best: - cleaner diffs when you change the name of a method (one line change instead of multiple lines) - works better on narrow screens, eg Github’s diff view, or with two terminals side by side on a laptop screen - works with any editor’s indenting shortcuts, no need for an IDE Also, trailing comma in the list of arguments is good because adding a new argument to a method becomes a one line, not two line diff.
This commit is contained in:
@@ -21,7 +21,7 @@ def test_letters_access_restricted(
|
||||
can_send_letters,
|
||||
response_code,
|
||||
mock_get_service_templates,
|
||||
url
|
||||
url,
|
||||
):
|
||||
service = service_json(can_send_letters=can_send_letters)
|
||||
mocker.patch('app.service_api_client.get_service', return_value={"data": service})
|
||||
@@ -39,7 +39,7 @@ def test_letters_lets_in_without_permission(
|
||||
mock_has_permissions,
|
||||
api_user_active,
|
||||
mock_get_service_templates,
|
||||
url
|
||||
url,
|
||||
):
|
||||
service = service_json(can_send_letters=True)
|
||||
mocker.patch('app.service_api_client.get_service', return_value={"data": service})
|
||||
|
||||
Reference in New Issue
Block a user