mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-11 18:37:33 -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:
@@ -20,10 +20,11 @@ def test_should_render_forgot_password(app_):
|
||||
'someuser@notonwhitelist.com'
|
||||
])
|
||||
def test_should_redirect_to_password_reset_sent_for_valid_email(
|
||||
app_,
|
||||
fake_uuid,
|
||||
email_address,
|
||||
mocker):
|
||||
app_,
|
||||
fake_uuid,
|
||||
email_address,
|
||||
mocker,
|
||||
):
|
||||
with app_.test_request_context():
|
||||
sample_user = create_active_user(fake_uuid, email_address=email_address)
|
||||
mocker.patch('app.user_api_client.send_reset_password_url', return_value=None)
|
||||
@@ -37,9 +38,10 @@ def test_should_redirect_to_password_reset_sent_for_valid_email(
|
||||
|
||||
|
||||
def test_should_redirect_to_password_reset_sent_for_missing_email(
|
||||
app_,
|
||||
api_user_active,
|
||||
mocker):
|
||||
app_,
|
||||
api_user_active,
|
||||
mocker,
|
||||
):
|
||||
with app_.test_request_context():
|
||||
|
||||
mocker.patch('app.user_api_client.send_reset_password_url', side_effect=HTTPError(Response(status=404),
|
||||
|
||||
Reference in New Issue
Block a user