Make ‘too many rows’ error actually work

Was using the wrong attribute name on the instance of `RecipientCSV`
(needed to match 19df1eb4ef/notifications_utils/recipients.py (L156) )

The ‘can’t show file contents’ message wasn’t showing up, now it is.
This commit is contained in:
Chris Hill-Scott
2016-10-17 10:20:14 +01:00
parent c4df3d1109
commit fb906fbfdb
2 changed files with 9 additions and 5 deletions

View File

@@ -795,7 +795,7 @@ def test_check_messages_shows_over_max_row_error(
mock_recipients = mocker.patch('app.main.views.send.RecipientCSV').return_value
mock_recipients.max_rows = 11111
mock_recipients.__len__.return_value = 99999
mock_recipients.has_too_many_rows.return_value = True
mock_recipients.too_many_rows.return_value = True
client.login(api_user_active)
with client.session_transaction() as session: