Skip to content

Commit

Permalink
Revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanw committed Mar 23, 2018
1 parent e26ff10 commit 296352e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions froide/foirequest/tests/test_mail.py
Expand Up @@ -60,16 +60,12 @@ def test_working_with_attachment(self):

request = FoiRequest.objects.get_by_secret_mail(self.secret_address)
messages = request.foimessage_set.all()
print('att.pk', messages[1].attachments[0].pk)
print('file.name', messages[1].attachments[0].file.name)
print('file.path', messages[1].attachments[0].file.path)
print('name', messages[1].attachments[0].name)
self.assertEqual(len(messages), 2)
self.assertEqual(messages[1].subject, "Fwd: Informationsfreiheitsgesetz des Bundes, Antragsvordruck für Open Data")
self.assertEqual(len(messages[1].attachments), 2)
attachment_names = set([a.name for a in messages[1].attachments])
self.assertIn("TI-IFG-AntragVordruck.docx", attachment_names)
self.assertIn("TI-IFG-AntragVordruck_converted.pdf", attachment_names)
self.assertEqual(messages[1].attachments[0].name,
"TI-IFG-AntragVordruck.docx")
self.assertTrue(messages[1].attachments[1].name.endswith(".pdf"))
self.assertFalse(messages[1].attachments[0].is_converted)
self.assertTrue(messages[1].attachments[1].is_converted)
self.assertTrue(messages[1].attachments[1].converted is None)
Expand Down

0 comments on commit 296352e

Please sign in to comment.