Browse Source

Update test_attachment.py

pull/6/head
Mathias Markl 7 years ago
committed by GitHub
parent
commit
0e3a8ee7c5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      muk_attachment_lobject/tests/test_attachment.py

13
muk_attachment_lobject/tests/test_attachment.py

@ -78,7 +78,6 @@ class AttachmentTestCase(common.HttpCase):
stream = attach.with_context({'stream': True}).store_lobject
self.assertTrue(stream.read())
@unittest.skip("skip")
def test_download(self):
self.param.set_param('ir_attachment.location', 'lobject')
attach = self.attachment.create({
@ -86,10 +85,8 @@ class AttachmentTestCase(common.HttpCase):
'datas': base64.b64encode(b"\xff data")})
self.authenticate('admin', 'admin')
url = "/web/lobject"
params = {'id': attach.id}
url_parts = list(urlparse(url))
query = dict(parse_qsl(url_parts[4]))
query.update(params)
url_parts[4] = urlencode(query)
url = urlunparse(url_parts)
self.assertTrue(self.url_open(url))
url = "/web/lobject/{}".format(
attach.id
)
r = self.url_open(url)
self.assertTrue(r)
Loading…
Cancel
Save