From 02a87a8832f991695bdb7db79067f18c2262230b Mon Sep 17 00:00:00 2001 From: MuK IT GmbH Date: Sat, 16 Feb 2019 19:22:07 +0000 Subject: [PATCH] publish muk_attachment_lobject - 12.0 --- muk_attachment_lobject/tests/test_attachment.py | 9 +++------ muk_attachment_lobject/tests/test_download.py | 8 +++++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/muk_attachment_lobject/tests/test_attachment.py b/muk_attachment_lobject/tests/test_attachment.py index 205685b..e9606d1 100644 --- a/muk_attachment_lobject/tests/test_attachment.py +++ b/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({ diff --git a/muk_attachment_lobject/tests/test_download.py b/muk_attachment_lobject/tests/test_download.py index 9b0be8e..fb6583a 100644 --- a/muk_attachment_lobject/tests/test_download.py +++ b/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):