def test_write_to_sns_topic_odd_chars_in_message(): custom_messages = \ [""""!"£%$^(&*)&(*%^}{}{:}).,./.,QWedfgopeqFEGWROJ321%!"$!¬`¬""", """;-hEloo2!fa"$"""] for test in custom_messages: assert isd_api_server.write_to_sns_topic( isd_payload['name'], isd_payload['email'], isd_payload['subject'], test) is False
def test_write_to_sns_topic_newlines_in_message(): custom_messages = \ [""""Hello\nWith\nUnix\nnewlines...""", """Hello\r\nwith\r\nmsdos\r\nnewlines"""] for test in custom_messages: assert isd_api_server.write_to_sns_topic( isd_payload['name'], isd_payload['email'], isd_payload['subject'], test) is True
def test_write_to_sns_topic_missing_message(): assert isd_api_server.write_to_sns_topic( isd_payload['name'], isd_payload['email'], isd_payload['subject'], "") is False
def test_write_to_sns_topic(): assert isd_api_server.write_to_sns_topic( isd_payload['name'], isd_payload['email'], isd_payload['subject'], isd_payload['message']) is True