Files
pms/hotel/tests/test_hotel_property.py
2019-09-23 10:19:16 +02:00

14 lines
479 B
Python

from .common import TestHotel
from odoo import fields
from odoo.exceptions import ValidationError
class TestHotelProperty(TestHotel):
# be aware using self.env.user.hotel_id because it is the value configure for the user running the tests
def test_default_pricelist(self):
# A default pricelist must be related with one and only one hotel
with self.assertRaises(ValidationError):
self.demo_hotel_property.default_pricelist_id = self.list0