match incoming mail to event
This commit is contained in:
parent
d18fa897a0
commit
90f47fa9d6
4 changed files with 15 additions and 22 deletions
|
@ -142,6 +142,7 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
aiosmtplib.send.assert_called_once()
|
||||
self.assertEqual('test ä', Email.objects.all()[0].subject)
|
||||
self.assertEqual('Text mit Quoted-Printable-Kodierung: äöüß', Email.objects.all()[0].body)
|
||||
self.assertTrue( Email.objects.all()[0].raw_file.path)
|
||||
|
||||
def test_handle_quoted_printable_2(self):
|
||||
from aiosmtpd.smtp import Envelope
|
||||
|
@ -162,6 +163,7 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
aiosmtplib.send.assert_called_once()
|
||||
self.assertEqual('suche_Mütze', Email.objects.all()[0].subject)
|
||||
self.assertEqual('Text mit Quoted-Printable-Kodierung: äöüß', Email.objects.all()[0].body)
|
||||
self.assertTrue( Email.objects.all()[0].raw_file.path)
|
||||
|
||||
def test_handle_base64(self):
|
||||
from aiosmtpd.smtp import Envelope
|
||||
|
@ -182,6 +184,7 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
aiosmtplib.send.assert_called_once()
|
||||
self.assertEqual('test', Email.objects.all()[0].subject)
|
||||
self.assertEqual('Text mit Base64-Kodierung: äöüß', Email.objects.all()[0].body)
|
||||
self.assertTrue( Email.objects.all()[0].raw_file.path)
|
||||
|
||||
def test_handle_client_reply(self):
|
||||
issue_thread = IssueThread.objects.create(
|
||||
|
@ -229,6 +232,7 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
self.assertEqual(IssueThread.objects.all()[0].name, 'test')
|
||||
self.assertEqual(IssueThread.objects.all()[0].state, 'pending_new')
|
||||
self.assertEqual(IssueThread.objects.all()[0].assigned_to, None)
|
||||
self.assertTrue( Email.objects.all()[2].raw_file.path)
|
||||
|
||||
def test_handle_client_reply_2(self):
|
||||
issue_thread = IssueThread.objects.create(
|
||||
|
@ -281,6 +285,7 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
self.assertEqual(IssueThread.objects.all()[0].name, 'test')
|
||||
self.assertEqual(IssueThread.objects.all()[0].state, 'pending_open')
|
||||
self.assertEqual(IssueThread.objects.all()[0].assigned_to, None)
|
||||
self.assertTrue( Email.objects.all()[2].raw_file.path)
|
||||
|
||||
def test_mail_reply(self):
|
||||
issue_thread = IssueThread.objects.create(
|
||||
|
@ -384,6 +389,7 @@ class LMTPHandlerTestCase(TestCase): # TODO replace with less hacky test
|
|||
states = StateChange.objects.filter(issue_thread=IssueThread.objects.all()[0])
|
||||
self.assertEqual(1, len(states))
|
||||
self.assertEqual('pending_new', states[0].state)
|
||||
self.assertEqual(event, IssueThread.objects.all()[0].event)
|
||||
|
||||
def test_mail_html_body(self):
|
||||
from aiosmtpd.smtp import Envelope
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue