Skip to content

Commit

Permalink
Reuce line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathansberry committed Dec 17, 2024
1 parent a05da0a commit fce77fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ def _get_recent_activity_list(user_dict, context):


def _create_sms_message(activities):
nr_of_datasets_to_display = toolkit.config.get('ckanext.dataset_subscriptions.sms_nr_of_datasets_to_display', 2)
nr_of_datasets_to_display = toolkit.config.get(
'ckanext.dataset_subscriptions.sms_nr_of_datasets_to_display', 2
)
header = _create_message_header(activities)
return toolkit.render(
'dataset-subscriptions_sms_body.j2',
Expand Down
13 changes: 8 additions & 5 deletions ckanext/dataset_subscriptions/tests/actions/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def test_user_create_supports_plugin_extras(self, sysadmin_context):
"phonenumber": "+447855474558",
"activity_streams_sms_notifications": True
}

created_user = helpers.call_action('user_create', context=sysadmin_context, **user_dict)

for key in ["phonenumber", "activity_streams_sms_notifications"]:
assert created_user[key] == user_dict[key]

Expand All @@ -34,8 +32,12 @@ def test_user_update_supports_plugin_extras(self, sysadmin_context):
}
}
helpers.call_action('user_update', **user_dict)
updated_user = helpers.call_action('user_show', context=sysadmin_context, include_plugin_extras=True, **user_dict)

updated_user = helpers.call_action(
'user_show',
context=sysadmin_context,
include_plugin_extras=True,
**user_dict
)
for key in ["phonenumber", "activity_streams_sms_notifications"]:
assert updated_user[key] == user_dict[key]

Expand All @@ -61,7 +63,8 @@ def test_user_validate_plugin_extras_valid_phonenumber(self, client_mock, sysadm
("", True, False, pytest.raises(toolkit.ValidationError)),
("", True, True, pytest.raises(toolkit.ValidationError))
])
def test_user_validate_plugin_extras_requires_phonenumber(self, phonenumber, enable_sms, enable_whatsapp, expectation, sysadmin_context):
def test_user_validate_plugin_extras_requires_phonenumber(self, phonenumber, enable_sms,
enable_whatsapp, expectation, sysadmin_context):
user_dict = {
"name": "test_user_001",
"fullname": "Mr. Test User",
Expand Down

0 comments on commit fce77fb

Please sign in to comment.