Пример #1
0
 def test_with_empty_to(self):
     message = copy.deepcopy(sample_message_content['Message'])
     message['To'] = None
     parser = ActivityEmailParser(message)
     with self.assertRaises(ActivityEmailUUIDError):
         # It should fail, but not because of a Not Iterable TypeError,
         # instead we handle that gracefully and raise an exception that
         # we control and catch later.
         parser.get_uuid()
Пример #2
0
 def test_with_empty_to(self):
     message = copy.deepcopy(sample_message_content['Message'])
     message['To'] = None
     parser = ActivityEmailParser(message)
     with self.assertRaises(ActivityEmailUUIDError):
         # It should fail, but not because of a Not Iterable TypeError,
         # instead we handle that gracefully and raise an exception that
         # we control and catch later.
         parser.get_uuid()
Пример #3
0
 def test_basic_email(self):
     parser = ActivityEmailParser(sample_message_content['Message'])
     assert parser.get_uuid() == '5a0b8a83d501412589cc5d562334b46b'
     assert parser.reply == (
         'This is a developer reply to an AMO.  It\'s nice.')
Пример #4
0
 def test_basic_email(self):
     parser = ActivityEmailParser(sample_message_content['Message'])
     assert parser.get_uuid() == '5a0b8a83d501412589cc5d562334b46b'
     assert parser.reply == (
         "This is a developer reply to an AMO.  It's nice.")