def test_email_answer_save(self):
     email_answer = EmailAnswer()
     email_answer.subject = 'prueba4'
     outbound_identifier = self.message.outbound_identifiers.get(person=self.candidate1)
     email_answer.answer_identifier = outbound_identifier.key
     email_answer.content_text = 'Hola Hola esto es una prueba'
     answer = email_answer.save()
     self.assertIsInstance(answer, Answer)
     self.assertEquals(answer.message, self.message)
     self.assertEquals(answer.content, email_answer.content_text)
Example #2
0
 def test_email_answer_save(self):
     email_answer = EmailAnswer()
     email_answer.subject = 'prueba4'
     outbound_identifier = self.message.outbound_identifiers.get(
         person=self.candidate1)
     email_answer.answer_identifier = outbound_identifier.key
     email_answer.content_text = 'Hola Hola esto es una prueba'
     answer = email_answer.save()
     self.assertIsInstance(answer, Answer)
     self.assertEquals(answer.message, self.message)
     self.assertEquals(answer.content, email_answer.content_text)
 def test_save_attachments_on_save(self):
     '''When saving it also calls the save an attachment'''
     email_answer = EmailAnswer()
     outbound_identifier = self.message.outbound_identifiers.get(person=self.candidate1)
     email_answer.answer_identifier = outbound_identifier.key
     email_answer.subject = 'prueba4'
     email_answer.content_text = 'prueba4lafieritaespeluda'
     email_answer.add_attachment(self.photo_fiera)
     email_answer.add_attachment(self.pdf_file)
     answer = email_answer.save()
     self.assertTrue(answer.attachments.filter(name=self.photo_fiera.name))
     self.assertTrue(answer.attachments.filter(name=self.pdf_file.name))
Example #4
0
 def test_save_attachments_on_save(self):
     '''When saving it also calls the save an attachment'''
     email_answer = EmailAnswer()
     outbound_identifier = self.message.outbound_identifiers.get(
         person=self.candidate1)
     email_answer.answer_identifier = outbound_identifier.key
     email_answer.subject = 'prueba4'
     email_answer.content_text = 'prueba4lafieritaespeluda'
     email_answer.add_attachment(self.photo_fiera)
     email_answer.add_attachment(self.pdf_file)
     answer = email_answer.save()
     self.assertTrue(answer.attachments.filter(name=self.photo_fiera.name))
     self.assertTrue(answer.attachments.filter(name=self.pdf_file.name))