mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD] base test case for ir_http multihotel
This commit is contained in:
@@ -20,7 +20,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
#from . import test_reservation
|
||||
#from . import test_folio
|
||||
from . import test_hotel_room_type_model
|
||||
from . import test_hotel_room_model
|
||||
# from . import test_reservation
|
||||
# from . import test_folio
|
||||
# from . import test_hotel_room_type_model
|
||||
# from . import test_hotel_room_model
|
||||
from . import test_inherited_ir_http
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
from datetime import timedelta
|
||||
from odoo import api, fields
|
||||
from odoo import api, fields
|
||||
from odoo.tests import common
|
||||
from odoo.tools import (
|
||||
DEFAULT_SERVER_DATE_FORMAT,
|
||||
@@ -30,8 +30,6 @@ import logging
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
# TestMail crea recursos utiles para nuestros test...
|
||||
# por ejemplo, usuarios con distintos tipos de nivel, etc...
|
||||
class TestHotel(common.SavepointCase):
|
||||
|
||||
@classmethod
|
||||
|
||||
11
hotel/tests/test_inherited_ir_http.py
Normal file
11
hotel/tests/test_inherited_ir_http.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from .common import TestHotel
|
||||
|
||||
|
||||
class TestInheritedIrHttp(TestHotel):
|
||||
|
||||
def test_user_hotel_company(self):
|
||||
admin_user = self.env.ref('base.user_root')
|
||||
self.assertTrue(admin_user.hotel_id.company_id in admin_user.company_ids,
|
||||
"Wrong hotel and company access settings for %s" % admin_user.name)
|
||||
|
||||
Reference in New Issue
Block a user