Mathias 7 years ago
parent
commit
05bc38fe59
  1. 2
      muk_web_preview_attachment/tests/test_attachment_extension.py
  2. 2
      muk_web_preview_mail/tests/test_mail_parse.py

2
muk_web_preview_attachment/tests/test_attachment_extension.py

@ -47,7 +47,7 @@ class AttachmentExtensionTestCase(common.TransactionCase):
self.sample = self.attachment_model.create({
'name': "test",
'datas_fname': "sample.png",
'datas': base64.encodestring(file.read()),
'datas': base64.b64decode(file.read()),
})
self.assertEqual(self.sample.extension, ".png")

2
muk_web_preview_mail/tests/test_mail_parse.py

@ -44,7 +44,7 @@ class MailParseTestCase(common.TransactionCase):
self.sample_mail_attachment = self.attachment_model.create({
'name': 'SampleMail',
'datas_fname': "sample.eml",
'datas': base64.encodestring(file.read()),
'datas': base64.b64decode(file.read()),
})
def tearDown(self):

Loading…
Cancel
Save