[FIX] calendar: Make tests demo data independent

Part-of: odoo/odoo#146649
This commit is contained in:
Yannick Tivisse
2023-12-18 23:32:05 +00:00
parent 0f447989d1
commit 043a60b59f
3 changed files with 10 additions and 4 deletions
@@ -21,6 +21,10 @@ class TestSyncGoogle2Odoo(TestSyncGoogle):
'email': 'public_email@example.com',
'type': 'contact',
})
self.env.ref('base.partner_admin').write({
'name': 'Mitchell Admin',
'email': 'admin@yourcompany.example.com',
})
self.private_partner = self.env['res.partner'].create({
'name': 'Private Contact',
'email': 'private_email@example.com',
@@ -19,6 +19,7 @@ class TestSyncOdoo2Google(TestSyncGoogle):
def setUp(self):
super().setUp()
self.env.user.partner_id.tz = "Europe/Brussels"
self.google_service = GoogleCalendarService(self.env['google.service'])
# Make sure this test will work for the next 30 years
self.env['ir.config_parameter'].set_param('google_calendar.sync.range_days', 10000)
@@ -123,7 +124,7 @@ class TestSyncOdoo2Google(TestSyncGoogle):
'res_id': partner.id,
})
with self.assertQueryCount(__system__=32):
with self.assertQueryCount(__system__=37):
event.unlink()
def test_event_without_user(self):