Browse Source

Update

pull/5/head
Mathias Markl 7 years ago
parent
commit
bc956c618c
  1. 3
      muk_web_preview_attachment/tests/test_attachment_extension.py

3
muk_web_preview_attachment/tests/test_attachment_extension.py

@ -51,10 +51,11 @@ class AttachmentExtensionTestCase(common.TransactionCase):
})
self.assertEqual(self.sample.extension, ".png")
def test_attachment_extension_bianry(self):
def test_attachment_extension_mimetype(self):
with closing(open(os.path.join(_path, 'tests/data/sample.png'), 'r')) as file:
self.sample = self.attachment_model.create({
'name': "test",
'mimetype': "image/png",
'datas': base64.encodestring(file.read()),
})
self.assertEqual(self.sample.extension, ".png")

Loading…
Cancel
Save