Skip to content

Commit

Permalink
rename test variables for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
leohemsted committed Aug 10, 2016
1 parent e94a008 commit f642d6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions tests/app/main/views/test_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def test_go_to_dashboard_after_tour(
mock_delete_service_template.assert_called_once_with(fake_uuid, fake_uuid)


@pytest.mark.parametrize('num_requested,msg', [
@pytest.mark.parametrize('num_requested,expected_msg', [
(0, '‘valid.csv’ contains 100 phone numbers.'),
(1, 'You can still send 49 messages today, but ‘valid.csv’ contains 100 phone numbers.')
], ids=['none_sent', 'some_sent'])
Expand All @@ -690,7 +690,7 @@ def test_check_messages_shows_too_many_messages_errors(
mock_has_permissions,
fake_uuid,
num_requested,
msg
expected_msg
):
# csv with 100 phone numbers
mocker.patch('app.main.views.send.s3download', return_value=',\n'.join(
Expand Down Expand Up @@ -726,4 +726,4 @@ def test_check_messages_shows_too_many_messages_errors(
# remove excess whitespace from element
details = page.find('div', class_='banner-dangerous').findAll('p')[1]
details = ' '.join([line.strip() for line in details.text.split('\n') if line.strip() != ''])
assert details == msg
assert details == expected_msg
4 changes: 2 additions & 2 deletions tests/app/notify_client/test_service_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_client_posts_archived_true_when_deleting_template(mocker):
)
def test_client_gets_service(mocker, function, params):
client = ServiceAPIClient()
mock_post = mocker.patch.object(client, 'get')
mock_get = mocker.patch.object(client, 'get')

function(client, 'foo')
mock_post.assert_called_once_with('/service/foo', params=params)
mock_get.assert_called_once_with('/service/foo', params=params)

0 comments on commit f642d6a

Please sign in to comment.