Mathias 7 years ago
parent
commit
79b51d001a
  1. 4
      muk_web_preview_attachment/tests/test_attachment_extension.py
  2. 2
      muk_web_preview_mail/tests/test_mail_parse.py

4
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.b64decode(file.read()),
'datas': base64.b64encode(file.read()),
})
self.assertEqual(self.sample.extension, ".png")
@ -56,7 +56,7 @@ class AttachmentExtensionTestCase(common.TransactionCase):
self.sample = self.attachment_model.create({
'name': "test",
'mimetype': "image/png",
'datas': base64.business(file.read()),
'datas': base64.b64encode(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.b64decode(file.read()),
'datas': base64.b64encode(file.read()),
})
def tearDown(self):

Loading…
Cancel
Save