Browse Source

publish muk_attachment_lobject - 12.0

pull/9/head
MuK IT GmbH 6 years ago
parent
commit
02a87a8832
  1. 9
      muk_attachment_lobject/tests/test_attachment.py
  2. 6
      muk_attachment_lobject/tests/test_download.py

9
muk_attachment_lobject/tests/test_attachment.py

@ -28,18 +28,15 @@ _logger = logging.getLogger(__name__)
class AttachmentTestCase(common.HttpCase):
def setUp(self):
super(MigrationTestCase, self).setUp()
super(AttachmentTestCase, self).setUp()
self.attachment = self.env['ir.attachment'].sudo()
self.params = self.env['ir.config_parameter'].sudo()
self.location = self.params.get_param('ir_attachment.location')
if self.location == 'file':
self.params.set_param('ir_attachment.location', 'db')
else:
self.params.set_param('ir_attachment.location', 'file')
self.params.set_param('ir_attachment.location', 'lobject')
def tearDown(self):
self.params.set_param('ir_attachment.location', self.location)
super(MigrationTestCase, self).tearDown()
super(AttachmentTestCase, self).tearDown()
def test_attachment(self):
attach = self.attachment.create({

6
muk_attachment_lobject/tests/test_download.py

@ -36,10 +36,12 @@ class DownloadTestCase(common.HttpCase):
def setUp(self):
super(DownloadTestCase, self).setUp()
self.attachment = self.env['ir.attachment'].sudo()
self.param = self.env['ir.config_parameter'].sudo()
self.param.set_param('ir_attachment.location', 'lobject')
self.params = self.env['ir.config_parameter'].sudo()
self.location = self.params.get_param('ir_attachment.location')
self.params.set_param('ir_attachment.location', 'lobject')
def tearDown(self):
self.params.set_param('ir_attachment.location', self.location)
super(DownloadTestCase, self).tearDown()
def test_attachment_download(self):

Loading…
Cancel
Save