attachment_swift: Restore 9.0 compat in test

Restore import to openerp and py2.7 compat
This commit is contained in:
Yannick Vaucher
2021-12-07 10:42:11 +01:00
parent 92bf8210ef
commit 328f9e08c1
2 changed files with 8 additions and 7 deletions
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# Copyright 2017-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
@@ -9,15 +10,15 @@ from mock import patch
import keystoneauth1
from odoo.addons.base.tests.test_ir_attachment import TestIrAttachment
from odoo.addons.attachment_swift.models.ir_attachment import SwiftSessionStore
from odoo.addons.attachment_swift.swift_uri import SwiftUri
from openerp.addons.base.tests.test_ir_attachment import test_ir_attachment
from openerp.addons.attachment_swift.models.ir_attachment import SwiftSessionStore
from openerp.addons.attachment_swift.swift_uri import SwiftUri
class TestAttachmentSwift(TestIrAttachment):
class TestAttachmentSwift(test_ir_attachment):
def setup(self):
super().setUp()
super(TestAttachmentSwift, self).setUp()
self.env['ir.config_parameter'].set_param('ir_attachment.location',
'swift')
@@ -2,12 +2,12 @@
# Copyright 2017 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from openerp.addons.base.tests.test_ir_attachment import TestIrAttachment
from openerp.addons.base.tests.test_ir_attachment import test_ir_attachment
from ..swift_uri import SwiftUri
from swiftclient.exceptions import ClientException
class TestAttachmentSwift(TestIrAttachment):
class TestAttachmentSwift(test_ir_attachment):
"""
Those tests are made to be run against a real Swift store (local or remote)
"""