Ejemplo n.º 1
0
 def test_working_with_attachment(self):
     with file("foirequest/tests/test_mail_02.txt") as f:
         _process_mail(f.read())
     request = FoiRequest.objects.get_by_secret_mail("*****@*****.**")
     messages = request.foimessage_set.all()
     self.assertEqual(len(messages), 2)
     self.assertEqual(messages[1].subject, u"Fwd: Informationsfreiheitsgesetz des Bundes, Antragsvordruck für Open Data")
     self.assertEqual(len(messages[1].attachments), 1)
     self.assertEqual(messages[1].attachments[0].name, u"TI  - IFG-Antrag, Vordruck.docx")
Ejemplo n.º 2
0
 def test_working(self):
     with file("foirequest/tests/test_mail_01.txt") as f:
         _process_mail(f.read())
     request = FoiRequest.objects.get_by_secret_mail("*****@*****.**")
     messages = request.foimessage_set.all()
     self.assertEqual(len(messages), 2)