google_calendar/tests/test_google_event.py

16 lines
598 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests.common import BaseCase
from odoo.addons.google_calendar.utils.google_calendar import GoogleEvent
class TestGoogleEvent(BaseCase):
def test_google_event_readonly(self):
event = GoogleEvent()
with self.assertRaises(TypeError):
event._events['foo'] = 'bar'
with self.assertRaises(AttributeError):
event._events.update({'foo': 'bar'})
with self.assertRaises(TypeError):
dict.update(event._events, {'foo': 'bar'})