Пример #1
0
 def test_messages_with_no_usable_contact_info(self):
     confirmation = self.make_mock_confirmation_notification(
         successes=[], snailmail="111 Main St.", voicemail="(555) 444-2222")
     expected = []
     result = SubmissionsService.get_confirmation_flash_messages(
         confirmation)
     self.assertEqual(result, expected)
Пример #2
0
 def test_messages_with_no_usable_contact_info(self):
     confirmation = self.make_mock_confirmation_notification(
         successes=[],
         snailmail="111 Main St.",
         voicemail="(555) 444-2222")
     expected = []
     result = SubmissionsService.get_confirmation_flash_messages(
         confirmation)
     self.assertEqual(result, expected)
Пример #3
0
 def test_messages_for_full_success(self):
     confirmation = self.make_mock_confirmation_notification(
         successes=[EMAIL, SMS],
         email="*****@*****.**",
         sms="(555) 444-2222")
     expected = [
         "We've sent you an email at [email protected]",
         "We've sent you a text message at (555) 444-2222",
     ]
     result = SubmissionsService.get_confirmation_flash_messages(
         confirmation)
     self.assertEqual(result, expected)
Пример #4
0
 def test_messages_for_full_success(self):
     confirmation = self.make_mock_confirmation_notification(
         successes=[EMAIL, SMS],
         email="*****@*****.**",
         sms="(555) 444-2222")
     expected = [
         "We've sent you an email at [email protected]",
         "We've sent you a text message at (555) 444-2222",
     ]
     result = SubmissionsService.get_confirmation_flash_messages(
         confirmation)
     self.assertEqual(result, expected)