diff --git a/modules/notification_email/tests/test_module.py b/modules/notification_email/tests/test_module.py index 04d0448881..ac2284ed1d 100644 --- a/modules/notification_email/tests/test_module.py +++ b/modules/notification_email/tests/test_module.py @@ -94,14 +94,15 @@ class NotificationEmailTestCase(CompanyTestMixin, ModuleTestCase): model, = Model.search([ ('name', '=', User.__name__), ]) - trigger, = Trigger.create([{ - 'name': 'Test creation', - 'model': model.id, - 'on_create_': True, - 'condition': 'true', - 'notification_email': notification_email.id, - 'action': 'notification.email|trigger', - }]) + trigger = Trigger( + name="Test creation", + model=model, + on_create_=True, + condition='true', + notification_email=notification_email) + trigger.on_change_notification_email() + self.assertEqual(trigger.action, 'notification.email|trigger') + trigger.save() with patch.object( notification_module,