mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-04 08:01:34 -04:00
Add addtional test cases for row errors
This commit is contained in:
@@ -136,14 +136,14 @@ def get_errors_for_csv(recipients, template_type):
|
||||
if 1 == number_of_rows_with_message_too_long:
|
||||
errors.append("shorten your message in 1 row")
|
||||
else:
|
||||
errors.append("shorten your message in {} rows".format(number_of_rows_with_missing_data))
|
||||
errors.append("shorten your messages in {} rows".format(number_of_rows_with_message_too_long))
|
||||
|
||||
if any(recipients.rows_with_empty_message):
|
||||
number_of_rows_with_empty_message = len(list(recipients.rows_with_empty_message))
|
||||
if 1 == number_of_rows_with_empty_message:
|
||||
errors.append("add content to empty message in 1 row")
|
||||
else:
|
||||
errors.append("add content to empty messages {} rows".format(number_of_rows_with_empty_message))
|
||||
errors.append("add content to empty messages in {} rows".format(number_of_rows_with_empty_message))
|
||||
|
||||
return errors
|
||||
|
||||
|
||||
Reference in New Issue
Block a user